Provides conversion of HTML content to markdown format for better AI consumption when fetching web content.
Context MCP Server
A Model Context Protocol (MCP) server that provides intelligent context management and web content fetching capabilities. This server enables AI assistants to efficiently store, retrieve, and manage contextual data while also fetching web content for real-time information access.
Features
- 🔍 Smart Content Fetching: Retrieve web content using Jina Reader API with fallback mechanisms
- 🌐 Web Content Processing: Convert HTML to markdown for better AI consumption
- 💾 File Management: Save fetched content to organized file structures
- 🚀 High Performance: Optimized fetching algorithms with intelligent caching
- 🔧 Easy Integration: Standard MCP protocol compatibility with various AI clients
Available Tools
fetch
Fetches content from a URL and returns it as text. This tool attempts to get content using the Jina Reader API first, and falls back to direct HTTP request if that fails.
Arguments:
url
(string, required): The URL to fetch content frommax_length
(integer, optional): Maximum number of characters to return (default: 5000)start_index
(integer, optional): Start content from this character index (default: 0)raw
(boolean, optional): Get raw content without markdown conversion (default: false)
Returns:
- The content of the URL as text
Example usage:
fetch_and_save
Fetches content from a URL and saves it to a file. This tool attempts to get content using the Jina Reader API first, and falls back to direct HTTP request if that fails.
Arguments:
url
(string, required): The URL to fetch content fromfile_path
(string, optional): The path where to save the file. If not provided, a filename will be automatically generated based on the URL domain and timestampraw
(boolean, optional): Get raw content without markdown conversion (default: false)
Returns:
- The path where the file was saved
Example usage:
Or with automatic naming:
Available Prompts
- fetch
- Fetch a URL and extract its contents as markdown
- Arguments:
url
(string, required): URL to fetch
Installation and Usage
Local Development Setup
- Clone or download the source code:
- Install dependencies using uv:
- Test the server:
Using with Claude Desktop (Local Source)
Add this configuration to your Claude Desktop config file:
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
Using with VS Code (Local Source)
Add to your VS Code settings or .vscode/mcp.json
:
Installation via Package Manager
Using uv (recommended)
When using uv
no specific installation is needed. We will
use uvx
to directly run context-mcp-server:
Using pip
After installation, run it as:
Package Manager Configuration
Claude Desktop with uvx
VS Code with uvx
Configuration
Environment Variables
CONTEXT_DIR
Sets the working directory where files will be saved when using the fetch_and_save
tool.
- Default:
data
- Priority:
CONTEXT_DIR
environment variable > default valuedata
Example:
Command Line Arguments
--user-agent
By default, depending on if the request came from the model (via a tool), or was user initiated (via a prompt), the server will use either the user-agent:
or:
This can be customized by adding the argument --user-agent=YourUserAgent
to the args
list in the configuration.
--proxy-url
The server can be configured to use a proxy by using the --proxy-url
argument.
Development
Setting up Development Environment
- Install development dependencies:
- Run linting and type checking:
- Build the package:
Testing
Test the server locally:
With custom work directory:
Use the MCP inspector for debugging:
With custom work directory:
Making Changes
- Edit the source code in
src/context_mcp_server/
- Test your changes with
uv run python -m context_mcp_server
- Update version in
pyproject.toml
if needed - Run tests and linting
Debugging
You can use the MCP inspector to debug the server:
For local development:
For uvx installations:
Contributing
We encourage contributions to help expand and improve context-mcp-server. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
License
context-mcp-server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
This server cannot be installed
A Model Context Protocol server that provides web content fetching capabilities with robots.txt checking removed, allowing LLMs to retrieve and convert web content to markdown.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides web content fetching and conversion capabilities.Last updated -43002JavaScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.Last updated -PythonMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables LLMs to fetch and process web content in multiple formats (HTML, JSON, Markdown, text) with automatic format detection.Last updated -54TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that converts various file formats (PDF, PowerPoint, Word, Excel, Images, etc.) to Markdown to make them accessible to LLMs.Last updated -1MIT License