context-aware-mcp
A configurable MCP server that intelligently routes natural language queries to the appropriate microservice endpoint based on user-defined service configurations.
README
context-aware-mcp
A configurable MCP (Model Context Protocol) server with intelligent API routing across microservices. Define your services in JSON, and the server automatically routes natural language queries to the right endpoint.
Quick Start
# Initialize config with a template
npx context-aware-mcp init --template openstore
# Or start with a blank config
npx context-aware-mcp init
Installation
npm install -g context-aware-mcp
Or use directly with npx:
npx context-aware-mcp <command>
CLI Commands
| Command | Description |
|---|---|
init |
Create a new mcp-config.json (blank or from template) |
add-service |
Add a service to config |
add-env |
Add an environment URL to a service |
set-swagger |
Set swagger path for a service |
remove-service |
Remove a service |
remove-env |
Remove an environment from a service |
list |
List configured services |
validate |
Validate mcp-config.json |
build |
Compile TypeScript |
install |
Generate MCP config for Claude Code or VS Code |
All config commands support both --flags mode and interactive mode (run without flags for prompts).
Config Format
Services are defined in mcp-config.json:
{
"$schema": "./mcp-config.schema.json",
"version": "1.0",
"defaults": { "environment": "qa", "swaggerPath": "/api/docs-json" },
"services": {
"my-service": {
"keywords": ["order", "checkout"],
"idPrefixes": ["ordr_"],
"type": "rest",
"environments": {
"qa": { "url": "https://qa-my-service.example.com" },
"local": { "url": "http://localhost:3001" }
}
}
},
"environmentKeywords": {
"qa": ["from qa", "in qa"],
"local": ["locally", "from local"]
}
}
MCP Integration
Generate Claude Code or VS Code config:
# Project-level Claude Code config (.mcp.json)
npx context-aware-mcp install
# VS Code config (.vscode/mcp.json)
npx context-aware-mcp install --target vscode
# Both
npx context-aware-mcp install --target all
MCP Tools
The server exposes these tools to AI assistants:
- smart_api_call — Intelligent routing from natural language queries
- fetch_swagger — Fetch and cache OpenAPI specs
- call_api — Direct API calls to service endpoints
- list_services — List available services
- kafka_list_topics / kafka_describe_topic / kafka_read_messages / kafka_consumer_groups — Kafka operations
Development
npm install
npm run build
npm test
See CONTRIBUTING.md for details.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.