home / mcp / bernerspace mcp server
Unified MCP server for all OAuth third-party integrations.
Configuration
View docs{
"mcpServers": {
"bernerspace-bernerspace": {
"url": "http://localhost:8000/slack",
"headers": {
"JWT_ISSUER": "https://your-auth-domain/",
"JWT_SECRET": "YOUR_JWT_SIGNING_SECRET",
"DATABASE_URL": "postgresql://localhost:5432/mcp_server",
"JWT_AUDIENCE": "my-api",
"JWT_JWKS_URL": "https://your-auth-domain/.well-known/jwks.json",
"SLACK_CLIENT_ID": "YOUR_SLACK_CLIENT_ID",
"SLACK_REDIRECT_URI": "http://localhost:8000/slack/oauth/callback",
"SLACK_CLIENT_SECRET": "YOUR_SLACK_CLIENT_SECRET",
"TOKEN_ENCRYPTION_KEYS": "YOUR_KEYS_IF_ANY"
}
}
}
}Bernerspace provides a unified MCP server to connect OAuth-enabled integrations like Slack and Gmail under a single JWT-secured surface. It offers a consistent tool interface across services, centralized authentication, and self-hosted endpoints you can call from your MCP clients.
You connect to Slack and Gmail through HTTP MCP endpoints. Use the provided MCP URL paths to access integration-specific capabilities and tools. Each integration exposes a set of tools you can call through a single, unified interface, with OAuth tokens stored securely in your database.
Prerequisites: you need Python and a PostgreSQL database running locally or accessible from your host.
1. Create a configuration file named .env with the following variables. You can adjust values for your environment. See the example for the exact variable names.
# Database
DATABASE_URL=postgresql://localhost:5432/mcp_server
# Auth (choose one)
# Option A: HS256
JWT_SECRET=your-jwt-signing-secret
# Option B: RS256 via JWKS
# JWT_JWKS_URL=https://your-auth-domain/.well-known/jwks.json
# JWT_ISSUER=https://your-auth-domain/
# JWT_AUDIENCE=my-api
# Slack OAuth
SLACK_CLIENT_ID=<slack_client_id>
SLACK_CLIENT_SECRET=<slack_client_secret>
SLACK_REDIRECT_URI=http://localhost:8000/slack/oauth/callback
# Optional: encrypt tokens at rest
# TOKEN_ENCRYPTION_KEYS=You can start the MCP server directly with Python if you are not using Docker. The server will listen on port 8000.
python server.pyIf you prefer containerized runtimes, build and run the image with Docker.
docker build -t bernerspace-mcp .
docker run --env-file .env -p 8000:8000 bernerspace-mcpYou can also start the MCP server using Docker Compose.
docker compose up -dGenerate a token for your user and use it to authenticate requests to the MCP server. The token is passed in the Authorization header as a Bearer token.
python generate_jwt.py --user-id <your_user_id>