@aauth/mcp-stdio
v0.1.2
Published
Stdio-to-HTTP proxy for MCP with AAuth signatures
Maintainers
Readme
@aauth/mcp-stdio
Stdio-to-HTTP proxy for MCP with AAuth signatures. Bridges a local stdio MCP client (like Claude Code) to a remote HTTP MCP server, signing all requests with AAuth.
See the AAuth repo for protocol overview.
Install
npm install @aauth/mcp-stdioCLI
npx @aauth/mcp-stdio --server https://api.example.com/mcp --agent https://user.github.ioOptions
| Flag | Env var | Description |
|------|---------|-------------|
| --server, -s | AAUTH_MCP_SERVER | Remote MCP server URL (required) |
| --agent, -a | AAUTH_AGENT_URL | Agent identity URL (required) |
| --delegate, -d | AAUTH_DELEGATE | Delegate name (default: claude) |
| --token-lifetime | AAUTH_TOKEN_LIFETIME | Agent token lifetime in seconds (default: 3600) |
Claude Code Configuration
Add to your MCP server config:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["@aauth/mcp-stdio", "--server", "https://api.example.com/mcp", "--agent", "https://user.github.io"]
}
}
}Or with environment variables:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["@aauth/mcp-stdio"],
"env": {
"AAUTH_MCP_SERVER": "https://api.example.com/mcp",
"AAUTH_AGENT_URL": "https://user.github.io"
}
}
}
}API
bridgeTransports(local, remote): Promise<void>
Bridges two MCP transports for bidirectional message forwarding.
import { bridgeTransports } from '@aauth/mcp-stdio'parseArgs(argv): StdioArgs
Parses CLI arguments with env var fallbacks.
import { parseArgs } from '@aauth/mcp-stdio'
const args = parseArgs(process.argv.slice(2))
// { serverUrl, agentUrl, delegate?, tokenLifetime? }License
MIT
