Experimental API - Context Connectors is experimental and subject to breaking changes.
For local MCP integration with Claude Desktop, Claude Code, Cursor, or other agents, see Local MCP Server.
Prerequisites
Steps
1. Install
npm install @augmentcode/context-connectors @modelcontextprotocol/sdk
2. Set credentials
export AUGMENT_API_TOKEN='your-token'
export AUGMENT_API_URL='https://your-tenant.api.augmentcode.com/'
3. Start the server
npx ctxc mcp http -i my-project --port 8080 --api-key "secret"
You should see:
MCP HTTP server running at http://localhost:8080/mcp
4. Test with curl
First, initialize a session:
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer secret" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": { "name": "curl-test", "version": "1.0.0" }
}
}' -i
Note the mcp-session-id header in the response. Use it for subsequent requests:
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer secret" \
-H "mcp-session-id: <session-id-from-initialize>" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search",
"arguments": { "query": "authentication" }
}
}'
You should see JSON search results.
Done!
Your index is accessible via MCP over HTTP at http://localhost:8080/mcp. Remote clients can now search your codebase using the Model Context Protocol over HTTP.
Also Works With
| Instead of… | Try… |
|---|
| localhost only | --host 0.0.0.0 to accept external connections |
| No CORS | --cors "*" or --cors "https://myapp.com" for browser clients |
| Full access | --search-only to disable file operations |
| Local storage | --store s3 with CC_S3_BUCKET for shared indexes |