- Home
- MCP servers
- Context
Context
- typescript
3
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"raunak-dev-18-context-mcp": {
"command": "node",
"args": [
"path/to/context-mcp/dist/index.js"
],
"env": {
"GOOGLE_AI_API_KEY": "your_key",
"UPSTASH_VECTOR_REST_URL": "your_url",
"UPSTASH_VECTOR_REST_TOKEN": "your_token"
}
}
}
}You can run a dedicated MCP server that manages persistent context for AI agents, enabling semantic searches, batch context operations, and metadata filtering. This server stores vectors in Upstash Vector DB and uses Google AI for embeddings, making it easy to add, query, and manage contextual information for your AI workflows.
How to use
You will connect your MCP client to a local MCP server that runs as a standard Node process. The server exposes functions to add context, batch add contexts, query for relevant context, delete single or multiple contexts, and fetch statistics. Start the server in the background of your AI agent workflow, then call the available endpoints from your agent configuration to enrich conversations, searches, and project notes with semantic awareness.
How to install
# Clone the repository
git clone <your-repo-url>
cd context-mcp
# Install dependencies
npm install
# Build the project
npm run build
Configuration and prerequisites
Before running the MCP server, supply credentials for storage and embeddings. You will configure environment variables in a .env file that the server reads on startup.
UPSTASH_VECTOR_REST_URL=your_upstash_vector_url
UPSTASH_VECTOR_REST_TOKEN=your_upstash_vector_token
GOOGLE_AI_API_KEY=your_google_ai_api_key
Available tools
add_context
Store a single piece of context with a unique id, content, and optional metadata for filtering.
add_contexts_batch
Store multiple contexts efficiently in a single operation, reducing round-trips.
query_context
Perform a semantic search to retrieve contexts related to a natural language query, with optional topK and filter parameters.
delete_context
Remove a single context by its id.
delete_contexts_batch
Delete multiple contexts by their ids in a single operation.
get_stats
Retrieve database statistics such as vector count and dimensions.