claude-desktop-mcp
v0.1.2
Published
Custom MCP server for Claude Desktop-like interface
Maintainers
Readme
Claude Desktop MCP Server
Node.js server implementing Model Context Protocol (MCP) to provide a Claude Desktop-like interface for AI assistants.
Features
- Client-server architecture based on JSON-RPC 2.0
- Resource management for context, history, and settings
- Prompt templates for chat, summarization, and document analysis
- Tool integrations for search, calculator, weather, and translation
- Simple CLI for easy server startup
Note: This server is designed as a demonstration and starting point for MCP protocol implementation.
API
Resources
claude://context: Current conversation contextclaude://history: Conversation historyclaude://settings: Model configuration settings
Prompts
chat
- Send a message to the conversation
- Input:
message(string) - Returns a simulated assistant response
summarize
- Generate a summary of provided text
- Inputs:
text(string): Text to summarizelength(string, optional): Desired summary length (short, medium, long)
- Returns formatted summary at requested length
analyze
- Perform detailed analysis of a document
- Inputs:
document(string): Document contentaspectsToAnalyze(array, optional): Aspects to focus on during analysis
- Returns structured analysis focusing on requested aspects
Tools
search
- Search for information on a topic
- Input:
query(string) - Returns simulated search results
calculator
- Perform math calculations
- Input:
expression(string) - Returns calculated result
weather
- Get weather information for a location
- Inputs:
location(string): Location nameunit(string, optional): Temperature unit (celsius/fahrenheit)
- Returns simulated weather data
translator
- Translate text to different languages
- Inputs:
text(string): Text to translatesourceLanguage(string, optional): Source language (auto-detect if empty)targetLanguage(string): Target language
- Returns translated text
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"claudeDesktop": {
"command": "npx",
"args": [
"claude-desktop-mcp"
]
}
}
}Installation
# Install from npm
npm install -g claude-desktop-mcp
# Or use npx directly
npx claude-desktop-mcpDevelopment
# Clone the repository
git clone <repository-url>
cd claude-desktop-mcp
# Install dependencies
npm install
# Start the server
node src/server.js
# Test with MCP Inspector
npx @modelcontextprotocol/inspector npx claude-desktop-mcpDebugging Guide
Using MCP Inspector
The MCP Inspector provides a GUI to interact with your server:
npx @modelcontextprotocol/inspector npx claude-desktop-mcpClaude Desktop Integration
For Claude Desktop integration issues:
- Check logs at
~/Library/Logs/Claude/mcp*.log - Enable DevTools:
echo '{"allowDevTools": true}' > ~/Library/Application\ Support/Claude/developer_settings.json - Access DevTools with
Command-Option-Shift-i
Server Initialization
- Always use absolute paths for better reliability
- Specify environment variables in
claude_desktop_config.json - Verify server is running using MCP Inspector
Project Structure
claude-desktop-mcp/
├── bin/
│ └── cli.js # Command-line interface
├── src/
│ ├── server.js # Main server implementation
│ ├── resources.js # Resource handlers
│ ├── prompts.js # Prompt implementations
│ └── tools.js # Tool implementations
└── package.json # Project configurationLicense
This 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.
