Simone MCP uses a Python-first architecture with two transport modes:
- stdio for local MCP clients
- streamable HTTP for remote MCP and A2A-facing deployments
Both transports delegate to a shared protocol.py handler that implements the full MCP 2026-06-30 specification including Tasks v2 (SEP-2663), HTTP header standardization (SEP-2243), list TTL (SEP-2549), structured output, and resource links.
MCP 2026-06-30 — full compliance including:
- Tasks v2 (SEP-2663):
tasks/get(inline result),tasks/update,tasks/cancel+notifications/tasks; server decides task creation autonomously;resultType: "task"discriminator;io.modelcontextprotocol/tasksextension - HTTP Header Standardization (SEP-2243):
Mcp-Method,Mcp-Name,Mcp-Param-*headers;-32001HeaderMismatch error - List TTL (SEP-2549):
ttlMs+cacheScopeon all list responses - Structured output (
structuredContent+outputSchema) - Tool
title,execution.taskSupport(all tools: forbidden — inline structuredContent) resource_linktype in tool results- Input validation as
isError: true(SEP-1303) _metapropagation on all methods- ISO 8601 timestamps on tasks (
createdAt,lastUpdatedAt) - SSE
retry:field MCP-Protocol-VersionHTTP header- Session cleanup on
DELETE /mcp
When libcst is installed, replace_symbol_body uses LibCST's Concrete Syntax Tree instead of Python's native ast. LibCST preserves 100% of comments, docstrings, and whitespace formatting — unlike ast which discards them on round-trip. Falls back to ast when LibCST is not available.
When jedi is installed, find_references uses Jedi's AST/goto-based resolution instead of regex. Jedi resolves symbols across files with IDE-level precision (equivalent to JetBrains PSI). Falls back to regex when Jedi is not available.
Both engines report which backend was used via the engine field in responses.
Every tools/call request gets a correlation ID:
- If the client provides
_meta.tool_call_id, that ID is used - Otherwise a SHA-256 hash of tool name + arguments is generated
- Correlation state is tracked (in_progress → completed/failed)
- Stale entries are cleaned up automatically
graph TD
Client[OpenCode or Codex] -->|stdio| Stdio[MCP stdio loop]
Client -->|HTTP| Http[FastAPI app]
Http --> A2A[A2A JSON-RPC handler]
Http --> MCP[MCP streamable HTTP]
Http --> Meta[Well-known metadata]
Stdio --> Core[Symbol and action core]
A2A --> Core
MCP --> Correlation[Tool Call Correlation]
Correlation --> Core
Core --> LibCST[LibCST engine]
Core --> Jedi[Jedi engine]
Core --> Files[Python AST file operations]
Core --> Memory[Hybrid memory]
Memory --> Qdrant[Qdrant vector search]
Memory --> Neo4j[Neo4j graph traversal]
The MCP spec in production has converged on streamable HTTP for remote servers, but local clients still benefit from stdio. Simone ships both.
The previous repo state contained only compiled JavaScript stubs. The repo now has an actual Python implementation under src/.
The HTTP transport validates Origin and can require Bearer tokens backed by JWKS validation when OAuth is enabled.
python3 src/cli.py serve-mcp
Supported methods:
initialize(version negotiation)pingtools/list(paginated)tools/call(with structured output, resource links, inline results)tasks/get(inline result — SEP-2663)tasks/update(resume input_required tasks — SEP-2663)tasks/cancel(rejects terminal tasks with -32602)resources/list(paginated)resources/read(path traversal protected)resources/subscriberesources/unsubscriberesources/templates/list(paginated)prompts/list(paginated)prompts/getlogging/setLevel(emits notifications/message)completion/completesampling/createMessage(returns error — use HTTP)elicitation/create(returns error — rephrase as tool call)
python3 src/cli.py serve
Endpoint:
GET|POST|DELETE /mcp
Implemented behavior:
initializereturns protocol/version metadata and a session idtools/listreturns the tool registrytools/callexecutes the action surface with correlation trackingGET /mcpopens an SSE-compatible event stream responseDELETE /mcpaccepts explicit session shutdown
The current implementation provides:
- symbol lookup (
sin_simone_mcp_symbol_search) - cross-file reference search (
sin_simone_mcp_find_references) — Jedi or regex - structural editing (
sin_simone_mcp_structural_edit) — LibCST or ast - hybrid memory query (
sin_simone_mcp_memory_query) - workspace overview (
sin_simone_mcp_project_overview) - health check (
sin_simone_mcp_health) - structured output with JSON Schema 2020-12 outputSchema on all tools
- inline results (taskSupport: forbidden — no task deferral)
Simone uses a hybrid memory contract:
- Qdrant for vector recall — queries collection metadata and point counts
- Neo4j for relationship-aware expansion — traces CALLS/IMPORTS edges from target symbols
When both backends are configured, queries execute against both and merge results. When neither is configured, the facade returns an empty result set with enabled: false.
POST /a2a/v1
Implemented methods:
agent.discover— returns the agent cardagent.ping— health check with timestamptool.list— lists available MCP toolstool.call— executes a tool with correlation tracking
The A2A layer translates incoming actions into the same core execution surface used by MCP.
Simone publishes:
/.well-known/agent-card.json/.well-known/agent.json/.well-known/oauth-client.json/.well-known/oauth-authorization-server
| Command | Description |
|---|---|
serve |
Start HTTP/A2A server (port 8234) |
serve-mcp |
Start MCP stdio server |
print-card |
Print agent discovery card |
run-action JSON |
Execute a tool action |
index [PATH] |
Show project overview |
validate |
Validate server configuration |
tool-list |
List available MCP tools |
- editable install
- pytest verification
- stdio MCP integration via
mcp-config.json
- multi-stage Docker build (builder + production)
- uv-based install for fast dependency resolution
- non-root user (
simone) - health check endpoint
- docker-compose stack with Qdrant and Neo4j
Use Spaces as compute and UI. Keep durable state in external systems or mounted storage rather than assuming local filesystem persistence.
pytest tests/ -vpython3 src/cli.py print-cardpython3 src/cli.py validatepython3 src/cli.py run-action '{"action":"simone.mcp.health"}'- stdio initialize/tools flow
- HTTP health and metadata endpoints