loading…
Search for a command to run...
loading…
A local proxy server that enables Slack MCP integration for opencode by rewriting OAuth-specific endpoints and callback flows. It ensures compatibility between
A local proxy server that enables Slack MCP integration for opencode by rewriting OAuth-specific endpoints and callback flows. It ensures compatibility between Slack's authentication requirements and opencode's fixed local callback structure.
Local TypeScript + Hono facade for Slack MCP that only intercepts the Slack OAuth-specific surfaces it must rewrite, while proxying MCP traffic to Slack and preserving the incoming Slack clientId from opencode requests.
Slack MCP is designed to work with Claude Code's OAuth flow. opencode uses a fixed local callback port for OAuth, and Slack MCP does not authenticate correctly against that flow out of the box.
Because of that mismatch, Slack MCP authentication fails in opencode unless the OAuth endpoints and callback flow are adapted. This project acts as a small local proxy that rewrites only the Slack OAuth-specific pieces, keeps the rest of the MCP traffic pointed at Slack, and makes Slack MCP usable from opencode.
See docs/installation.md for setup, background-run instructions, Docker usage, verification, and troubleshooting.
Useful commands:
pnpm lint
pnpm format
pnpm format:check
pnpm typecheck
pnpm check
pnpm test
pnpm test:all
Source lives in src/, and the main route implementation is in src/app.ts.
For production-style runs, the app can also be compiled to build/ and started with pnpm start.
Optional environment variables:
FACADE_HOST - facade host, default 127.0.0.1FACADE_PORT or PORT - facade port, default 3120CALLBACK_HOST - callback listener host, default 127.0.0.1CALLBACK_PORT - callback port, default 3118LOG_LEVEL - pino log level, default infoOPENCODE_HOST - opencode callback host, default 127.0.0.1OPENCODE_PORT - opencode callback port, default 19876OPENCODE_CALLBACK_PATH - opencode callback path, default /mcp/oauth/callbackREQUEST_TIMEOUT_MS - timeout for Slack and local proxy requests, default 10000All listener hosts are restricted to loopback values (127.0.0.1 or localhost) to avoid exposing the callback bridge on external interfaces.
For containerized runs, listener hosts may also use 0.0.0.0, and OPENCODE_HOST may be set to a reachable host such as host.docker.internal.
Use this in place of the remote Slack MCP URL after the local facade is already running:
{
"slack": {
"type": "remote",
"url": "http://127.0.0.1:3120/mcp",
"oauth": {
"clientId": "YOUR_SLACK_CLIENT_ID"
}
}
}
http://127.0.0.1:3120/mcpredirect_uri=http://localhost:3118/callbackhttp://127.0.0.1:19876/mcp/oauth/callbackredirect_uri=http://localhost:3118/callbackThe server logs:
redirect_uriredirect_uriThe unit tests cover the highest-risk rewrite paths:
WWW-Authenticate resource metadata rewritingUse pnpm test for unit tests and pnpm test:all to run both static checks and tests together.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"opencode-slack-mcp-proxy": {
"command": "npx",
"args": []
}
}
}