A collection of Model Context Protocol (MCP) servers managed with pnpm and Turborepo.
mcp/
├── packages/
│ └── openai-mcp/ # OpenAI API MCP Server
├── package.json
├── pnpm-workspace.yaml
└── turbo.json
- Node.js >= 18
- pnpm >= 9.0
- Docker & Docker Compose (for running servers)
pnpm install
pnpm buildThe project includes a CLI tool for easy server management:
# Start OpenAI MCP server (port 3500)
./mcp -m openai
# Start Gemini MCP server (port 3501)
./mcp -m gemini
# Start all servers
./mcp -m all
# Stop a server
./mcp -m openai --down
# Restart a server
./mcp -m openai --restart
# View server logs
./mcp -m openai --logs
# Show help
./mcp --helpOr using pnpm:
pnpm mcp -m openai| Server | Port | Health Check | SSE Endpoint |
|---|---|---|---|
| OpenAI | 3500 | http://localhost:3500/health | http://localhost:3500/sse |
| Gemini | 3501 | http://localhost:3501/health | http://localhost:3501/sse |
Each server requires its API key. Create a .env file in each package directory:
packages/openai-mcp/.env
OPENAI_API_KEY=sk-your-api-key-herepackages/gemini-mcp/.env
GEMINI_API_KEY=your-api-key-here# Watch mode for local development
pnpm dev
# Build all packages
pnpm build| Package | Description |
|---|---|
| @mcp/openai | OpenAI API integration (GPT, DALL-E, Embeddings, TTS) |
| @mcp/gemini | Google Gemini API integration (Text, Chat, Vision, Embeddings) |
All MCP servers support two modes:
- stdio mode (default): For Claude Desktop integration
- HTTP/SSE mode: For external access via REST API
Set MCP_MODE=http environment variable to enable HTTP mode.
- Create a new directory under
packages/ - Add the required
package.jsonandtsconfig.json - Implement your MCP server using
@modelcontextprotocol/sdk - Add HTTP/SSE support with Express
- Create Dockerfile and docker-compose.yml
- Update the
mcpCLI script to include the new server
curl http://localhost:3500/healthResponse:
{
"status": "ok",
"server": "openai-mcp"
}Connect to the SSE endpoint using an MCP client or test with:
curl -X POST http://localhost:3500/sse \
-H "Content-Type: application/json" \
-d '{"method": "tools/list"}'MIT