MCP Protocol
The Smarter Project MCP server: the public server of The Smarter Project’s repositories, documentation and blog.
SmarterProjectMCPServer serves the tools of smarter.apps.mcpserver.protocol.registry,
over the protocol of MCPServerBase, and
SmarterProjectMCPServerView serves it. Its read-only
tools need no authentication. create_issue, comment_on_issue, close_issue and
create_pull_request are listed only when the request carries the caller’s GitHub token.
Note
Experimental. The MCPServer was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental, and will be documented.
- class smarter.apps.mcpserver.protocol.server.SmarterProjectMCPServer(repository=None, github_token=None)[source]
Bases:
MCPServerBaseThe MCP server of one repository of The Smarter Project, or of all of them.
The view creates one for each request, with the repository from the url, and the GitHub token from the request’s
Authorization: Bearerheader. Its tools are the classes ofTOOL_CLASSESthat the scope serves.- Parameters:
repository (
ProjectRepository|None) – The repository, or None for all of them.github_token (
SecretStr|None) – The caller’s GitHub token, from the request’sAuthorization: Bearerheader, or None. The tools that write, e.g.create_issue, are served only with one.
Example usage:
server = SmarterProjectMCPServer(get_repository("smarter-cli")) response = server.handle({"jsonrpc": "2.0", "id": 1, "method": "tools/list"})
- __init__(repository=None, github_token=None)[source]
Build the server’s scope, and the tools that it serves.
A tool is served only if
serves()says so: a project-wide tool, e.g.search_blog, is left out of the server of one repository, and a tool that writes to GitHub is left out unless the request carries a GitHub token.- Parameters:
repository (
ProjectRepository|None) – The repository, or None for all of them.github_token (
SecretStr|None) – The caller’s GitHub token, or None.
- instructions()[source]
Return the server’s instructions, which MCP clients add to the LLM’s system prompt.
They are
INSTRUCTIONS, about the server’s one repository, or about all of them, with the list of the repositories andBLOG_INSTRUCTIONS. When the server serves the tools that write to GitHub,ISSUE_INSTRUCTIONSare added, which tell the LLM to call them only with the user’s consent.- Return type:
- Returns:
The instructions, as plain text.
- property name: str
smarter-project, orsmarter-project-<repository>, e.g.smarter-project-smarter-cli.- Type:
The server’s name
- server_info()[source]
Return the server’s identity, for the initialize result.
The server of one repository takes its title and description from the repository, and the server of all of them describes The Smarter Project.
- Return type:
Implementation- Returns:
The server’s name, title, version (the platform’s), description and website.