For developers testing against local Haiven instances
This guide shows how to quickly set up the MCP server for local development with authentication disabled.
Start your local Haiven backend. It should be running at http://localhost:8080
# Clone and setup
git clone https://github.com/tw-haiven/haiven-mcp-server
cd haiven-mcp-server
sh ./scripts/install.shCreate a .env file:
HAIVEN_API_URL=http://localhost:8080
HAIVEN_DISABLE_AUTH=truepython -m src.mcp_server --helpAdd this MCP server to your AI tool's configuration:
"haiven-dev": {
"command": "/full/path/to/your/haiven-mcp-server/.venv/bin/python",
"args": ["/full/path/to/your/haiven-mcp-server/mcp_server.py"],
"env": {
"HAIVEN_API_URL": "http://localhost:8080",
"HAIVEN_DISABLE_AUTH": "true"
}
}Restart your AI tool and ask: "What Haiven prompts are available?"
# Terminal 1: Start Haiven backend
cd haiven && poetry run app
# Terminal 2: Test MCP server
cd haiven-mcp-server && python mcp_server.py --help# Direct test of MCP server
cd haiven-mcp-server
export HAIVEN_API_URL="http://localhost:8080"
export HAIVEN_DISABLE_AUTH="true"
python -m src.mcp_server# Test with authentication enabled
export HAIVEN_API_URL="http://localhost:8080"
export HAIVEN_API_KEY="your-dev-api-key"
unset HAIVEN_DISABLE_AUTH
# Test against remote instance
export HAIVEN_API_URL="https://your-remote-haiven.com"
export HAIVEN_API_KEY="your-remote-api-key"export PYTHONPATH=.
export HAIVEN_API_URL="http://localhost:8080"
export HAIVEN_DISABLE_AUTH="true"
python -c "
import logging
logging.basicConfig(level=logging.DEBUG)
from mcp_server import HaivenMCPServer
print('Debug logging enabled')
"curl http://localhost:8080/api/prompts# Check if Haiven backend is running
curl http://localhost:8080/health# Check if prompts are loaded
curl http://localhost:8080/api/prompts | jq '.[0].id'# Test basic import
python -c "from mcp_server import HaivenMCPServer; print('OK')"Create different config files:
# dev.env
HAIVEN_API_URL=http://localhost:8080
HAIVEN_DISABLE_AUTH=true
# staging.env
HAIVEN_API_URL=https://staging.haiven.com
HAIVEN_API_KEY=staging-api-keyLoad with:
source dev.env && python mcp_server.pyYou can also run from the project root:
python mcp_server.py- Local Haiven backend running
- MCP server dependencies installed (
sh ./scripts/install.sh) - Environment variables set
- AI tool configured with local MCP server
- Basic connectivity tested
- MCP server responds to prompts query
Happy local development!
MCP Setup Resources:
- VS Code MCP Servers - Comprehensive guide for VS Code
- Claude Code MCP - Official Claude documentation
- Cursor MCP Setup - Cursor-specific instructions
- MCP Protocol Overview - General MCP concepts