MCP Instructions Server
MCP Instructions Server
Shared Claude instructions for teams. Edit instructions.yaml, everyone gets updates.
Quick Start
Option 1: Docker (Recommended)
docker compose up -d
# Server runs at http://localhost:8080/mcpOption 2: Python
# macOS / Linux
./setup.sh
python server.py
# Windows
python -m venv .venv && .venv\Scripts\activate && pip install -r requirements.txt
python server.pyOption 3: Cloud (Railway)
Set environment variables:
MCP_TRANSPORT=streamable-http
PORT=8080Option 4: Azure Container Instances
./deploy.shRequirements: Azure CLI (az) and Docker installed.
The script creates:
Resource Group
Azure Container Registry
Container Instance with public URL
Redeploy after changes:
# Set your ACR name (check Azure portal or use: az acr list -g rg-mcp-server --query "[0].name" -o tsv)
ACR=your-acr-name
# Build, push and restart
az acr login -n $ACR
docker build -t $ACR.azurecr.io/mcp-server:latest .
docker push $ACR.azurecr.io/mcp-server:latest
az container restart -g rg-mcp-server -n mcp-serverUseful commands:
az container logs -g rg-mcp-server -n mcp-server # View logs
az container restart -g rg-mcp-server -n mcp-server # Restart
az group delete -n rg-mcp-server --yes # Delete allWhich Option to Choose?
Mode | Best For | Cost | Latency |
stdio (local Python) | Personal use | Free | ~0ms |
Docker | Local dev/testing | Free | ~10ms |
Railway | Quick deploy | Pay per use | ~100ms+ |
Azure ACI | Team sharing, Azure users | ~$1-2/month | ~100ms+ |
Note: The server only gets called when you invoke a prompt (/team-instructions:production, etc.). Normal Claude messages don't hit the server. Instructions are loaded once into the conversation context.
Connect Claude Code
Create config file:
Global (all projects):
~/.claude/mcp.jsonPer-repo (this project only):
.mcp.jsonin repo root
Remote server (Docker/Railway/Cloud)
{
"mcpServers": {
"team-instructions": {
"type": "streamable-http",
"url": "https://your-server-url/mcp"
}
}
}Local Python (STDIO)
macOS / Linux:
{
"mcpServers": {
"team-instructions": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/server.py"]
}
}
}Windows:
{
"mcpServers": {
"team-instructions": {
"command": "C:\\path\\to\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\server.py"]
}
}
}Environment Variables
Variable | Default | Description |
|
| Transport: |
|
| Server port (for HTTP transports) |
|
| Alternative port variable |
Available Commands
Prompts
Prompt | Description |
| Strict mode with team standards |
| No rules, full freedom |
| Review code with standards |
Tools
Tool | Description |
| List all commands |
| Reload instructions from file |
Resources
Resource | Description |
| Core principles |
| Production guidelines |
| Delivery checklist |
| All sections combined |
Edit Instructions
Edit
instructions.yamlCall
refreshtool (or restart server)Done - all connected clients get updates
Transports
Transport | Use Case | Endpoint |
| Remote/Cloud (recommended) |
|
| Remote/Cloud (legacy) |
|
| Local Python execution | N/A |
Troubleshooting
Issue | Fix |
Server not found | Use absolute paths, check JSON syntax |
Python errors | Need Python 3.10+, run |
Connection refused | Check |
Invalid Host header | Server needs |
Test Server
# Health check (SSE transport only - not available in streamable-http)
curl http://localhost:8080/health
# Test streamable-http endpoint
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'Note: The /health endpoint only exists when using SSE transport. For streamable-http, use the MCP endpoint test above.