A fake MCP server for Tangent documentation indexing and searching
npm install mcp-tangent-serverA Model Context Protocol (MCP) server that provides fake documentation indexing and searching capabilities for Tangent. This server implements two main functions for managing documentation in a simulated knowledge base.
- Documentation Indexing: Index new documentation with metadata, tags, and content
- Smart Search: Search through indexed documentation with filtering and relevance scoring
- Fake Data: Comes pre-loaded with sample documentation for testing
- MCP Compatible: Works with any MCP-compatible client
``bash`
npm install -g mcp-tangent-server
`bash`
git clone
cd mcp-tangent-server
npm install
`bash`
npm start
Add to your MCP client configuration:
`json`
{
"mcpServers": {
"tangent": {
"command": "mcp-tangent-server"
}
}
}
To use this MCP server with Cursor IDE, follow these steps:
1. Open Cursor Settings:
- Open Cursor IDE
- Click on the gear icon (āļø) in the bottom left corner
- Navigate to Features ā Model Context Protocol
2. Add New MCP Server:
- Click "Add MCP Server"
- Configure as follows:
Server Name: Tangent Documentationmcp-tangent-server
Command: (if installed globally) or npx mcp-tangent-server[]
Arguments: Leave empty
3. Save and Restart:
- Click "Save"
- Restart Cursor to apply changes
Alternatively, you can manually edit your Cursor MCP configuration:
1. Locate Configuration File:
- macOS: ~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/config.json%APPDATA%\Cursor\User\globalStorage\cursor.mcp\config.json
- Windows: ~/.config/Cursor/User/globalStorage/cursor.mcp/config.json
- Linux:
2. Add Server Configuration:
`json`
{
"mcpServers": {
"tangent-docs": {
"command": "mcp-tangent-server",
"args": []
}
}
}
For project-specific usage, create a .cursor/mcp.json file in your project root:
`json`
{
"mcpServers": {
"tangent-docs": {
"command": "npx",
"args": ["mcp-tangent-server"]
}
}
}
Once configured, you can use the documentation tools in Cursor's chat:
1. Index Documentation:
``
@tangent Please index this documentation:
Title: "API Authentication Guide"
Content: "This guide explains how to authenticate with our API..."
Tags: ["api", "auth", "security"]
2. Search Documentation:
``
@tangent Search for documentation about "authentication" with tags "api"
3. Direct Tool Usage:
The tools will also appear in Cursor's tool palette and can be invoked directly through the chat interface.
To verify the integration is working:
1. Open Cursor's chat panel
2. Type @ and you should see the Tangent server listedtangent_index_documentation
3. The tools and tangent_search_documentation should be available
- Server not appearing: Ensure the server is installed globally (npm install -g mcp-tangent-server) or use the full path to the executablechmod +x
- Connection issues: Check that the command and arguments are correct in your configuration
- Permission errors: On macOS/Linux, ensure the executable has proper permissions ()
To use this MCP server with Claude Desktop:
1. Locate Claude Desktop Configuration:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json
- Windows:
2. Add Server Configuration:
`json`
{
"mcpServers": {
"tangent-docs": {
"command": "mcp-tangent-server",
"args": []
}
}
}
3. Restart Claude Desktop and the server will be available in your conversations.
This server is compatible with any MCP-compliant client. For other clients, use the following general configuration:
- Command: mcp-tangent-serverstdio
- Transport: []
- Arguments: (empty)
Index new documentation into the Tangent system.
Parameters:
- title (required): The title of the documentationcontent
- (required): The main content/body of the documentation url
- (optional): URL where the documentation can be accessedtags
- (optional): Array of tags for categorizationmetadata
- (optional): Additional metadata object
Example:
`json`
{
"title": "API Authentication Guide",
"content": "This guide explains how to authenticate with our API using JWT tokens...",
"url": "https://docs.example.com/auth",
"tags": ["api", "authentication", "security"],
"metadata": {
"author": "John Doe",
"version": "1.2"
}
}
Search through indexed documentation with various filters.
Parameters:
- query (required): Search query stringtags
- (optional): Array of tags to filter bylimit
- (optional): Maximum number of results (default: 10, max: 100)include_content
- (optional): Whether to include full content in results (default: true)
Example:
`json`
{
"query": "authentication",
"tags": ["api", "security"],
"limit": 5,
"include_content": true
}
The server comes pre-loaded with sample documentation including:
- Getting Started with Tangent
- Advanced Search Features
- API Integration Guide
- Troubleshooting Common Issues
- Best Practices for Documentation
`bash`
npm run dev
This will start the server with Node.js inspector enabled for debugging.
You can test the server using any MCP client or by running it directly and sending JSON-RPC messages via stdin/stdout.
The server uses:
- @modelcontextprotocol/sdk: For MCP protocol implementation
- In-memory storage: Fake database for documentation (resets on restart)
- Simple search: Text-based search with relevance scoring
- JSON-RPC: Communication protocol over stdio
Successfully indexed documentation: "Your Title"Document Details:
- ID: doc1234567890_abcdefghi
- Title: Your Title
- Content Length: 150 characters
- Tags: api, guide
- URL: https://example.com
- Indexed At: 2024-01-15T10:30:00Z
`$3
`
Search Results for: "your query"Found 3 matching documents (filtered by tags: api, guide)
Search completed in ~50ms
š Document Title (ID: doc123)
š URL: https://example.com
š·ļø Tags: api, guide
š
Updated: 2024-01-15T10:30:00Z
ā Relevance: 85.50
š Content: This is the beginning of the document content...
``MIT
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request
For issues and questions, please open an issue on the GitHub repository.