- Home
- MCP servers
- Static OAuth
Static OAuth
- javascript
0
GitHub Stars
javascript
Language
3 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Connect MCP clients to remote servers using static OAuth client credentials, enabling secure authorization code flow for marketplace scenarios and pre-registered clients. This MCP server supports both remote HTTP connections and local runtime execution via npx, with clear options to supply your client_id and client_secret either directly in the config or through environment variables.
How to use
You can run a remote MCP server connection over HTTP or start a local MCP process that runs alongside your tools. For HTTP, you point the client to a remote SSE URL and provide static OAuth client information. For local execution, you run a command that launches the MCP server with your static credentials. In all cases, you must ensure the OAuth callback URL is registered where your marketplace requires it, and you provide the client_id and client_secret to authorize the connection.
How to install
// Prerequisites
- Node.js 18+ installed
- A marketplace with an OAuth callback URL registered: http://localhost:17091/oauth/callback
// Option 1: HTTP connection (remote server URL)
// Start the MCP server by referencing the remote SSE endpoint and static OAuth data
// Manual example to illustrate the remote start (do not run as-is without your values)
npx mcp-remote-static https://remote.mcp.server/sse --static-oauth-client-info "{\"client_id\":\"your-client-id\",\"client_secret\":\"your-client-secret\"}"
// Option 2: Local stdio execution (embedded command)
// This starts a local MCP process that connects to the remote SSE URL with static OAuth info
npx mcp-remote-static https://remote.mcp.server/sse --static-oauth-client-info "{\"client_id\":\"your-client-id\",\"client_secret\":\"your-client-secret\"}"
Configuration and usage notes
Choose the method that matches your deployment scenario. If you are configuring a marketplace integration, ensure the callback URL http://localhost:17091/oauth/callback is registered in your marketplace OAuth client settings.
Configuration options and examples
json
{
"mcpServers": {
"static_http_mcp": {
"type": "http",
"url": "https://remote.mcp.server/sse",
"args": []
}
}
}
json
{
"mcpServers": {
"static_stdio_mcp": {
"command": "npx",
"args": [
"mcp-remote-static",
"https://remote.mcp.server/sse",
"--static-oauth-client-info",
"{\"client_id\":\"your-client-id\",\"client_secret\":\"your-client-secret\"}"
]
}
}
}
json
{
"mcpServers": {
"static_stdio_env": {
"command": "npx",
"args": [
"mcp-remote-static",
"https://remote.mcp.server/sse",
"--static-oauth-client-info",
"{\"client_id\":\"${MCP_CLIENT_ID}\",\"client_secret\":\"${MCP_CLIENT_SECRET}\"}"
],
"env": {
"MCP_CLIENT_ID": "your-client-id",
"MCP_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Authoritative environment variables
If you supply credentials via environment variables, declare them so they are available to the startup process. For example, set MCP_CLIENT_ID and MCP_CLIENT_SECRET in your shell or orchestration system before launching the MCP process.
Available tools
staticOAuth
Provides static OAuth client credentials to the MCP connection, enabling authorization code flow with pre-registered clients.