mcp-tangent-server
v1.0.2
Published
A fake MCP server for Tangent documentation indexing and searching
Maintainers
Readme
MCP Tangent Server
A 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.
Features
- 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
Installation
From npm (once published)
npm install -g mcp-tangent-serverFrom source
git clone <repository-url>
cd mcp-tangent-server
npm installUsage
As a standalone server
npm startIn MCP client configuration
Add to your MCP client configuration:
{
"mcpServers": {
"tangent": {
"command": "mcp-tangent-server"
}
}
}Cursor IDE Integration
To use this MCP server with Cursor IDE, follow these steps:
Method 1: Global Configuration (Recommended)
Open Cursor Settings:
- Open Cursor IDE
- Click on the gear icon (⚙️) in the bottom left corner
- Navigate to
Features→Model Context Protocol
Add New MCP Server:
- Click "Add MCP Server"
- Configure as follows:
Server Name:
Tangent DocumentationCommand:
mcp-tangent-server(if installed globally) ornpx mcp-tangent-serverArguments: Leave empty
[]Save and Restart:
- Click "Save"
- Restart Cursor to apply changes
Method 2: Configuration File
Alternatively, you can manually edit your Cursor MCP configuration:
Locate Configuration File:
- macOS:
~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/config.json - Windows:
%APPDATA%\Cursor\User\globalStorage\cursor.mcp\config.json - Linux:
~/.config/Cursor/User/globalStorage/cursor.mcp/config.json
- macOS:
Add Server Configuration:
{ "mcpServers": { "tangent-docs": { "command": "mcp-tangent-server", "args": [] } } }
Method 3: Project-Specific Configuration
For project-specific usage, create a .cursor/mcp.json file in your project root:
{
"mcpServers": {
"tangent-docs": {
"command": "npx",
"args": ["mcp-tangent-server"]
}
}
}Using the Server in Cursor
Once configured, you can use the documentation tools in Cursor's chat:
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"]Search Documentation:
@tangent Search for documentation about "authentication" with tags "api"Direct Tool Usage: The tools will also appear in Cursor's tool palette and can be invoked directly through the chat interface.
Verification
To verify the integration is working:
- Open Cursor's chat panel
- Type
@and you should see the Tangent server listed - The tools
tangent_index_documentationandtangent_search_documentationshould be available
Troubleshooting
- Server not appearing: Ensure the server is installed globally (
npm install -g mcp-tangent-server) or use the full path to the executable - Connection issues: Check that the command and arguments are correct in your configuration
- Permission errors: On macOS/Linux, ensure the executable has proper permissions (
chmod +x)
Claude Desktop Integration
To use this MCP server with Claude Desktop:
Locate Claude Desktop Configuration:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
Add Server Configuration:
{ "mcpServers": { "tangent-docs": { "command": "mcp-tangent-server", "args": [] } } }Restart Claude Desktop and the server will be available in your conversations.
Other MCP Clients
This server is compatible with any MCP-compliant client. For other clients, use the following general configuration:
- Command:
mcp-tangent-server - Transport:
stdio - Arguments:
[](empty)
Available Tools
1. tangent_index_documentation
Index new documentation into the Tangent system.
Parameters:
title(required): The title of the documentationcontent(required): The main content/body of the documentationurl(optional): URL where the documentation can be accessedtags(optional): Array of tags for categorizationmetadata(optional): Additional metadata object
Example:
{
"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"
}
}2. tangent_search_documentation
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:
{
"query": "authentication",
"tags": ["api", "security"],
"limit": 5,
"include_content": true
}Sample Data
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
Development
Running in development mode
npm run devThis will start the server with Node.js inspector enabled for debugging.
Testing the server
You can test the server using any MCP client or by running it directly and sending JSON-RPC messages via stdin/stdout.
Architecture
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
API Response Format
Index Documentation Response
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:00ZSearch Documentation Response
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...License
MIT
Changelog
Version 1.0.2
- Refactored server architecture following MCP best practices
- Improved error handling with proper validation and standardized error codes
- Better code organization with modular structure and clear separation of concerns
- Enhanced performance with optimized search algorithms
- Proper signal handling for graceful shutdowns
- Standardized tool naming following MCP conventions
- Comprehensive input validation for all parameters
- Improved logging and error reporting
Version 1.0.1
- Fixed tool naming to match client expectations
- Updated documentation with correct tool names
Version 1.0.0
- Initial release with basic indexing and search functionality
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
For issues and questions, please open an issue on the GitHub repository.
