Model Context Protocol (MCP) Architecture, Agent Security & SyndiPath API Docs
Authoritative engineering specification covering JSON-RPC 2.0 capability negotiation, STDIO vs Streamable HTTP transports, llms.txt discovery, zero-secret sandboxing, and live GraphQL endpoints.
1. MCP Lifecycle & JSON-RPC 2.0 Wire Architecture
Model Context Protocol standardizes how host applications (Claude Desktop, Cursor, Windsurf, VS Code, and autonomous Go/Python orchestrators) exchange context, invoke typed tools, and read URI-addressed resources over stateful or stateless JSON-RPC 2.0 sessions.
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": { "roots": { "listChanged": true }, "sampling": {} },
"clientInfo": { "name": "syndipath-agent-host", "version": "2.0.0" }
}
}2. Transport Matrix: STDIO vs Streamable HTTP vs Legacy SSE
Local IDE workflows favor subprocess STDIO pipes for sub-millisecond IPC and zero network port exposure, while multi-tenant cloud agents deploy Streamable HTTP (/mcp single endpoint supporting chunked responses and OAuth 2.1 bearer tokens).
| Transport | Typical Overhead | Authentication Model | Recommended Deployment |
|---|---|---|---|
| STDIO | < 0.4 ms (OS Pipe) | OS Keychain / Env | Claude Desktop, Cursor, Windsurf, VS Code |
| Streamable HTTP | 4 – 9 ms (TLS 1.3) | OAuth 2.1 + PKCE (RFC 8707) | Cloudflare Workers, Go/K8s Gateways, n8n |
| SSE (2024-11) | 15 – 40 ms (Dual HTTP) | Bearer Header | Legacy Backwards Compatibility |
3. Zero-Secret Manifest Hardening & Sandboxing Standard
Never commit literal API keys inside .cursor/mcp.json or claude_desktop_config.json. Reference OS keychain variables or scoped .env files, pin exact package versions or Docker image digests, and enforce read-only database roles for analytical MCP tools.
mcp.json & OpenAPI 3.1 Schema Linter & Security Auditor4. AI Discovery Endpoints: llms.txt, Markdown Mirrors & Sitemaps
SyndiPath exposes deterministic machine-readable endpoints for LLM retrieval agents, RAG indexers, and search crawlers across all 26 locales.
5. Public GraphQL API (/api/graphql) Queries & Mutations
Query verified MCP manifests, filter by category or locale, retrieve playground telemetry, or programmatically submit and upvote packages over HTTP POST.
curl -sS -X POST https://syndipath.com/api/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query($locale: String!) { siteStats { totalMcpServers pgVersion goVersion } mcpServers(locale: $locale, limit: 5) { slug title transport npxCommand upvotes } }",
"variables": { "locale": "en" }
}'mutation UpvotePackage($slug: String!) {
upvoteMcpServer(slug: $slug) {
slug
upvotes
alreadyVoted
}
}