testing/README.md
This directory contains a minimal stdio MCP server for local testing.
a (number), b (number).@modelcontextprotocol/sdk and zodVia Node:
node testing/fake-stdio-mcp-server.mjs
Via script (adds a stable entrypoint path):
testing/run-fake-stdio-mcp-server.sh
Environment variables provided when launching (either from your shell or by the app) will be visible to the print_envs tool.
export FOO=bar
export SECRET_TOKEN=example
testing/run-fake-stdio-mcp-server.sh
When adding a stdio MCP server in the app, use:
testing/run-fake-stdio-mcp-server.sh (absolute path recommended)stdioFOO=bar)Once connected, you should see the two tools listed:
calculator_addprint_envsThis directory contains a minimal HTTP MCP server for local testing.
a (number), b (number).http moduleVia Node:
node testing/fake-http-mcp-server.mjs
Via script:
testing/run-fake-http-mcp-server.sh
3002, configurable via PORT environment variableexport PORT=3002
node testing/fake-http-mcp-server.mjs
When adding an HTTP MCP server in the app, use:
testing-http-mcp-server (or any name)httphttp://localhost:3002/mcp (or your configured port)Authorization: Bearer token) if needed for testing.Once connected, you should see the tools listed:
calculator_addprint_envsfake-oauth-mcp-server.mjs bundles a minimal OAuth 2.1 authorization
server (discovery, DCR, /authorize, /token, refresh) with a
Streamable-HTTP MCP endpoint behind a bearer-token check. Used to test
the Dyad MCP OAuth flow against a deterministic target rather than a
real provider like Linear.
The /authorize endpoint auto-redirects with a code (no consent UI),
so an automated test can drive the full flow without a browser. PKCE
S256 is enforced; refresh tokens rotate on use.
| Variable | Default | Effect |
|---|---|---|
PORT | 4002 | HTTP listen port |
FAKE_DCR | 1 | 0 rejects /register (forces use of static client_id) |
FAKE_CLIENT_ID | none | Required when FAKE_DCR=0; the only client_id accepted by /authorize |
FAKE_CLIENT_SECRET | none | When set, /token requires it in the body |
FAKE_REQUIRED_SCOPE | none | When set, /authorize 400s if scope missing |
FAKE_TOKEN_TTL_SEC | 3600 | Access-token lifetime (set low to exercise refresh) |
DCR (mimics Linear/Atlassian/Notion):
testing/run-fake-oauth-mcp-server.sh
Static client_id (mimics non-DCR providers — the case real public MCPs generally don't expose):
FAKE_DCR=0 FAKE_CLIENT_ID=my-test-client \
testing/run-fake-oauth-mcp-server.sh
Add an MCP server in the app with:
httphttp://localhost:4002/mcpFAKE_CLIENT_ID value in static moderead (or leave blank)Click Connect — the auto-redirect completes silently and the
"OAuth: connected" badge should flip on. calculator_add and whoami
tools should appear.