Running the MCP Server Locally¶
The Silicofeller Quantum Studio MCP server is a Python package in mcp_server/ of the
repository. It holds no data of its own: every tool calls the Quantum Studio REST API with the
caller’s bearer token, so project permissions, plan checks and MCP rate limits are enforced by
the backend. This page is for developers who want to run the server against a local or private
backend. Users of the hosted service do not need it; see Connect Claude.
Requirements¶
Python 3.10 (the version the test suite pins).
The packages in
mcp_server/requirements.txt:mcp==2.3.0,httpx==0.28.1,anyio==4.15.1,starlette==1.7.0anduvicorn==0.54.0.A reachable Quantum Studio backend and a token for it.
Install the server:
cd mcp_server
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
Get a token¶
Use one of these:
A personal MCP token (
sfmcp_…) created on Connect Claude in the web app you are pointing at.For local development only, a web-session JWT: in the browser console of the signed-in app,
localStorage.getItem("qs_token"). It is treated as a web session, so web-app plan rules apply. For example, a Free account cannot save designs with it, while it can with an MCP token. A session token is also not limited by the MCP allow-list, which is why thesemi_*tools work with it.
Transport modes¶
Mode |
Command |
Behaviour |
|---|---|---|
stdio (default) |
|
One user. The token comes from |
Streamable HTTP |
|
Serves |
Hosted |
|
Multi-tenant. HTTP only, binds |
The HTTP modes run stateless, so one instance can serve many users.
Environment variables¶
Variable |
Default |
Purpose |
|---|---|---|
|
|
Backend the tools call. |
|
value of |
Base of the |
|
none |
Token for stdio and local HTTP use. Ignored in hosted mode. |
|
off |
|
|
|
Listening port for the HTTP modes. |
|
repository copy of |
Component catalog used by |
|
none |
In hosted mode, turns on OAuth resource-server mode. Must match the backend’s
|
|
|
Authorization server advertised to clients. |
|
|
This server’s public MCP URL. |
Connect a local client¶
claude mcp add silicofeller --env SILICOFELLER_TOKEN=<token> \
-- /ABSOLUTE/PATH/mcp_server/.venv/bin/python -m silicofeller_mcp.server
Add --env SILICOFELLER_API_URL=http://127.0.0.1:5000 to target a local backend.
In Claude Desktop → Settings → Developer → Edit Config:
{
"mcpServers": {
"silicofeller": {
"command": "/ABSOLUTE/PATH/mcp_server/.venv/bin/python",
"args": ["-m", "silicofeller_mcp.server"],
"cwd": "/ABSOLUTE/PATH/mcp_server",
"env": { "SILICOFELLER_TOKEN": "<token>" }
}
}
}
.venv/bin/python -m silicofeller_mcp.server --http --port 8765
claude mcp add --transport http silicofeller http://127.0.0.1:8765/mcp \
--header "Authorization: Bearer <token>"
Always pass tokens in the Authorization header. The backend rejects MCP tokens sent as a
?token= query parameter.
Demo scripts¶
mcp_server/demo/ contains bash scripts that run a complete local stack with no calls to
silicofeller.com. They expect POSIX tools and virtual environments at backend/.venv and
mcp_server/.venv, plus frontend/node_modules.
Script |
What it does |
|---|---|
|
Starts the backend on |
|
Runs the production layout locally: the MCP server in hosted mode with OAuth on port
|
|
Stops everything the two scripts started. |
The password for collab@demo.com is in backend/app/startup_data.py. The frontend
development server forwards /mcp to VITE_MCP_URL (default http://127.0.0.1:8770).
claude.ai cannot reach localhost; test claude.ai connectors against a deployed server.
Run the tests¶
cd mcp_server
.venv/bin/python -m pytest -q tests # design logic, hosted auth, error mapping, OAuth
.venv/bin/python tests/e2e_stdio.py # real MCP client and server against a mock API
SILICOFELLER_API_URL=http://127.0.0.1:5000 SILICOFELLER_TOKEN=<jwt> \
.venv/bin/python tests/e2e_real_backend.py # against a local backend
Deployment¶
The repository includes mcp_server/Dockerfile. The production runbook (Docker Compose,
nginx routing of /mcp and the OAuth secret) is in deploy/MCP_HOSTING.md.