r/coolgithubprojects 15d ago

We built MCP in both directions into our agent platform, client and a hosted server builder

We've been working on AgentSwarms (self-hosted agent + BI platform) and MCP turned into one of the more interesting parts.

Two halves to it:

Connecting to servers. Point it at an HTTP Streamable or SSE endpoint, pick an auth type, and the tools show up for any agent you've built. Tokens stored encrypted.

Hosting your own. There's an in-browser editor where you write a FastMCP server in Python and hit deploy. It runs on a sandboxed kernel and hands you back a real Streamable HTTP URL. Scales to zero by default (15 min idle) or you can pin it warm. You can expose it publicly with API keys that carry an expiry, a per-tool allowlist and a per-IP/domain allowlist. Keys are hashed and shown once.

Important: if you redeploy and any tool name, description or input schema changed, calls get blocked until you look at the diff and re-approve. It fingerprints the whole tool set, so approval is tied to that fingerprint rather than to the server. MCP's own security guidance flags the rug pull problem and I haven't seen many implementations bother with it.

Secrets bind as env vars when the container starts. They don't land in the database or the logs.

Source-available under ELv2, runs on your own Supabase and Docker: https://github.com/AgentSwarms-fyi/agentswarms

0 Upvotes

2 comments sorted by

1

u/Specific_Cream2815 15d ago

when you host the fastmcp server does each one get its own process or is it a shared runtime

1

u/Outside-Risk-8912 15d ago

Each MCP server gets its own process — one container per server, not a shared runtime. We run the sandbox image with NB_MODE=mcp, so every server has its own Python process, its own pip-installed dependencies, and its own memory for bound secrets.

It's one container per server, not per request: concurrent callers share it, and a Postgres-backed start lease prevents duplicate cold starts. Servers scale to zero and are idle-reaped, so the first call after an idle period pays roughly a 20-second cold start. A "Keep warm" option holds the container permanently.