Recall Documentation MCP for Cursor
This Model Context Protocol (MCP) tool enables the Cursor AI assistant to search and reference external documentation websites. It automatically scrapes, indexes, and makes searchable any documentation site, creating a powerful knowledge extension for your Cursor IDE.
Features
- 🌐 Web Scraping: Automatically indexes external documentation websites
- 🔍 Smart Search: Find relevant documentation based on natural language queries
- 🔗 Direct References: Get complete document content with source URLs
- 🤖 AI Integration: Seamlessly works with Cursor's AI assistant
Prerequisites
- Node.js (v14 or later)
- npm or yarn
- Cursor IDE
Installation
- Clone this repository:
git clone https://github.com/recallnet/recall-docs-mcp
cd web-docs-mcp
- Install dependencies:
npm install
- Configure the documentation website URL in
.env:
DOCS_URL=https://docs.recall.network/
MAX_PAGES=50
- Build the MCP:
npm run build
Setting Up in Cursor
- Open Cursor IDE
- Navigate to Settings → MCP
- Click "Add new MCP server"
- Configure as follows:
- Name: Web Documentation MCP
- Type: command
- Command:
node /full/path/to/recall-docs-mcp/dist/index.js
- Click "Create" and ensure the server shows as "Enabled"
Usage Using NPX
Using Environment Variables in Cursor/Claude/Windsurf Configuration
Configure your MCP servers JSON file for your designated consuming environment by adding this MCP using the following format:
{
"mcpServers": {
"recall-docs-mcp": {
"command": "npx",
"args": [
"-y",
"github:recallnet/recall-docs-mcp"
]
}
}
}
Usage
Once installed, you can interact with your documentation in two ways:
1. Natural Language Queries
Simply ask the Cursor AI assistant questions about your documentation:
"How do I authenticate with the Recall Network API?"
"What are the available endpoints in Recall Network?"
"Explain how to set up a node in Recall Network"
The AI will use your MCP to search the documentation and provide relevant information.
2. Direct Tool Usage
You can also use the MCP tools directly:
// Search the documentation
search_docs({
query: "authentication",
limit: 5
});
// Get a specific document by ID
get_document({
id: "api-reference"
});
Customization
Supporting JavaScript-Rendered Sites
For documentation sites that use heavy client-side rendering, uncomment the Puppeteer-based scraping code in src/web-scraper.ts and update the dependencies.
Adjusting Search Relevance
Modify the scoring algorithm in the search method of the WebDocScraper class to better match your specific documentation structure.
Troubleshooting
- MCP shows "Client closed": Make sure the path to your MCP script is correct and Node.js is available in your PATH.
- No search results: Check that scraping completed successfully by looking at the console output when starting the MCP.
- Incomplete content: Some sites may require additional scraping logic. Check the console logs for details.
Limitations
- The scraper may not correctly extract content from all websites, especially those with complex JavaScript rendering.
- The search is based on simple keyword matching and doesn't understand semantic meaning.
- There's a maximum number of pages that will be indexed (configurable via MAX_PAGES).
License
MIT
Acknowledgements
- Cursor IDE for their excellent AI-powered development environment
- Model Context Protocol for enabling custom tool integration
- Cheerio for HTML parsing capabilities
