OpenCode Slack MCP Proxy

OpenCode Slack MCP Proxy

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.

Category
Visit Server

README

opencode-slack-mcp-proxy

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.

Motivation

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.

Installation

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.1
  • FACADE_PORT or PORT - facade port, default 3120
  • CALLBACK_HOST - callback listener host, default 127.0.0.1
  • CALLBACK_PORT - callback port, default 3118
  • LOG_LEVEL - pino log level, default info
  • OPENCODE_HOST - opencode callback host, default 127.0.0.1
  • OPENCODE_PORT - opencode callback port, default 19876
  • OPENCODE_CALLBACK_PATH - opencode callback path, default /mcp/oauth/callback
  • REQUEST_TIMEOUT_MS - timeout for Slack and local proxy requests, default 10000

All 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.

opencode config

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"
    }
  }
}

Flow

  1. opencode connects to the local MCP facade at http://127.0.0.1:3120/mcp
  2. the facade serves local OAuth discovery metadata
  3. opencode uses the facade's local authorize and token endpoints
  4. the authorize endpoint redirects to Slack with redirect_uri=http://localhost:3118/callback
  5. the callback bridge forwards Slack's callback to http://127.0.0.1:19876/mcp/oauth/callback
  6. the token endpoint forwards to Slack and forces the same redirect_uri=http://localhost:3118/callback

Logs

The server logs:

  • OAuth discovery responses
  • authorize forwarding and rewritten redirect_uri
  • token forwarding and rewritten redirect_uri
  • Slack token response status and sanitized body
  • callback forwarding to opencode

Tests

The unit tests cover the highest-risk rewrite paths:

  • authorize redirect rewriting
  • token redirect rewriting
  • callback proxy failure handling
  • WWW-Authenticate resource metadata rewriting

Use pnpm test for unit tests and pnpm test:all to run both static checks and tests together.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured