@enkindl/code-context-mcp
v0.2.11
Published
Context MCP server (CLI) - runable via npx
Downloads
482
Readme
@enkindl/code-context-mcp
Model Context Protocol (MCP) integration for Code Context - A powerful MCP server that enables AI assistants and agents to index and search codebases using semantic search.
Model Context Protocol (MCP) allows you to integrate Enkindl Code Context with your favorite AI coding assistants, e.g. Github Copilot.
Quick Start
Prerequisites
Before using the MCP server, make sure you have:
- API key for your chosen embedding provider (OpenAI, VoyageAI, Gemini, or Ollama setup)
- CosmoDb database (local or cloud)
Update Package.json to next version "name": "@enkindl/code-context-mcp", "version": "0.2.5",
Build -
pnpm build
Login to npm -
npm login
To run locally -
pnpm --filter @enkindl/code-context-mcp build && PORT=3000 OPENAI_API_KEY="" COSMOS_MONGO_CONN="" node packages/mcp/bin/cli.js
Publish to npm
npm publish
Add MCP
{
"mcpServers": {
"enkindl-code-context": {
"url": "http://localhost:3000/mcp",
"type": "http"
}
}
}
Add a service
- sudo vi /etc/systemd/system/code-context-mcp.service
[Unit] Description=Code Context MCP After=network.target [Service] ExecStart=/usr/bin/env PORT=3002 OPENAI_API_KEY="" COSMOS_MONGO_CONN="" npx -y @enkindl/[email protected] Restart=always RestartSec=5 User=azureuser WorkingDirectory=/home/azureuser/data
[Install] WantedBy=multi-user.target
Daemon Reload sudo systemctl daemon-reload
Restart Service sudo systemctl restart code-context-mcp.service
Add nginx entry on port 3002
server {
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name functions.enkindl.com www.functions.enkindl.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
proxy_pass http://localhost:3002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/functions.enkindl.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/functions.enkindl.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot}
