
context_fetch_mcp
Improve prompt context with local resources fetched from source documentation.
Repository Info
About This Server
Improve prompt context with local resources fetched from source documentation.
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Documentation Database Server
This project implements a Model Context Protocol (MCP) server designed to manage and query technical documentation stored in a MongoDB database.
Scope and Intent
The primary goal of this server is to provide a backend service accessible via MCP for:
- Fetching Documentation: Ingesting documentation content (expected in JSON format) from external URLs and storing it in a structured MongoDB collection.
- Querying Documentation: Enabling text-based search across the stored documentation, leveraging MongoDB's text indexing capabilities.
- Aggregating Metadata: Providing tools to aggregate data about the stored documentation (e.g., grouping by technology).
- Accessing Raw Content: Retrieving specific documentation entries based on technology, version, or database ID.
- Exposing Schema: Making the database schema discoverable via an MCP resource.
This server is intended to be used by AI clients (like language models) or other tools that understand MCP, allowing them to interact with a centralized documentation knowledge base.
Features
- Tools:
fetch-documentation: Fetches and stores documentation from a URL.query-documentation: Performs text search on stored documents.aggregate-documentation: Aggregates document metadata (e.g., counts by technology).
- Resources:
database.schema: Provides the schema of the MongoDB collections.documentation.content: Retrieves specific documentation entries by technology/version or ID.
- Technology Stack:
- Node.js with TypeScript
- MongoDB with Mongoose ODM
@modelcontextprotocol/sdkfor MCP implementation- Zod for schema validation
- pnpm for package management
Setup and Running
- Ensure MongoDB is running locally (default port 27017).
- Navigate to the project directory (
context_fetch_mcp_server). - Install dependencies:
pnpm install - Compile TypeScript:
pnpm build - Create the necessary text index in MongoDB:
use documentation_db; db.documentations.createIndex({ technology: "text", "content.title": "text", "content.description": "text" }); - Run the server:
node dist/index.js
The server will connect via STDIO. Refer to PROMPTS.md for example client interactions.
Quick Start
Clone the repository
git clone https://github.com/algorhythmic/context_fetch_mcpInstall dependencies
cd context_fetch_mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.