Views
The Django view of the Smarter Project MCP server.
SmarterProjectMCPServerView is the MCP Streamable HTTP endpoint of
SmarterProjectMCPServer. It is mounted at:
/api/v1/mcp/smarter-project/: every repository of The Smarter Project./api/v1/mcp/smarter-project/<repository>/: one repository, e.g.smarter-cli.
Only POST is served. A POST whose messages are all notifications is answered 202
Accepted, with no body, and every other POST with application/json. The server
issues no session, and offers no GET stream, so GET and DELETE are answered 405 Method
Not Allowed, which MCP clients expect of a stateless server.
The endpoint requires no authentication: it is read-only, and serves the public
repositories of The Smarter Project. Each client IP address may send at most
smarter_settings.mcpserver_rate_limit requests a minute: see
smarter.apps.mcpserver.ratelimit.
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.views.SmarterProjectMCPServerView(**kwargs)[source]
Bases:
SmarterViewThe MCP Streamable HTTP endpoint of the Smarter Project MCP server.
- Parameters:
repository – From the url: the repository’s name, or None for every repository.
- dispatch(request, *args, **kwargs)
- http_method_names = ['post', 'options']
- post(request, repository=None)[source]
Answer the JSON-RPC message, or batch of messages, in the request body.
- Parameters:
request (
HttpRequest) – The request.repository (
str|None) – The repository’s name, or None for every repository.
- Return type:
- Returns:
The JSON-RPC response, or
202 Acceptedif no message needs one. An unknown repository is404 Not Found, a body that is not JSON is400 Bad Request, and a client over the rate limit is429 Too Many Requests.