MCP Claude Desktop
Integrates with Git repositories to analyze recent changes, commit statistics, and diffs for automated code review workflows through Claude Desktop.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Claude Desktopask Claude Desktop to explain quantum computing with a 120-second timeout"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Claude Desktop
A Model Context Protocol (MCP) server that enables Claude Code to communicate with Claude Desktop. This server allows Claude Code to send prompts to Claude Desktop and poll for responses.
Inspired by claude-chatgpt-mcp, this project adapts the concept for Apple's ecosystem using native macOS automation.
Features
Send prompts from Claude Code to Claude Desktop
Automatic polling for responses with configurable timeout
List available conversations in Claude Desktop
Error handling and retry logic
Comprehensive logging
Related MCP server: Desktop Pilot MCP
Installation
You can install and use this MCP server in two ways:
Option 1: Using npx (Recommended)
The simplest way to use this server is directly with npx, without any installation:
{
"mcpServers": {
"claude-desktop": {
"command": "npx",
"args": ["mcp-claude-desktop"]
}
}
}Option 2: Local Installation
Clone this repository:
git clone https://github.com/dpaluy/mcp-claude-desktop
cd mcp-claude-desktopInstall dependencies:
npm installBuild the project:
npm run buildConfigure MCP:
{
"mcpServers": {
"claude-desktop": {
"command": "node",
"args": ["/path/to/mcp-claude-desktop/dist/index.js"]
}
}
}System Requirements
macOS 11.0+ (Big Sur or later)
Node.js 18+
Claude Desktop app installed
Accessibility permissions granted for AppleScript
Granting Accessibility Permissions
Open System Preferences > Security & Privacy > Privacy
Select "Accessibility" from the left sidebar
Click the lock to make changes
Add Terminal (or your terminal app) to the allowed apps
Restart your terminal
MCP Tools
This MCP server provides two tools:
ask
Purpose: Send a prompt to Claude Desktop and get a response
Parameters:
prompt: The text to send to Claude Desktop (required)conversationId: Optional ID to continue a specific conversationtimeout: Response timeout in seconds (optional, default: 30, max: 300)pollingInterval: How often to check for response in seconds (optional, default: 1.5, min: 0.5)
get_conversations
Purpose: Get a list of available conversations in Claude Desktop
Parameters: None
Usage
Once configured, Claude Code can use the MCP in various ways:
General Purpose Usage
When Claude uses these tools, it will call them with parameters like:
Basic usage:
Tool:
askParameters:
{ "prompt": "What is dependency injection?" }
With custom timeout:
Tool:
askParameters:
{ "prompt": "Explain quantum computing", "timeout": 120 }
With both timeout and polling interval:
Tool:
askParameters:
{ "prompt": "Quick question", "timeout": 10, "pollingInterval": 0.5 }
Get conversations:
Tool:
get_conversationsParameters:
{}
How to Use in Claude
Once the MCP server is configured and running, you can use these tools directly in Claude:
Basic usage:
"Use the ask tool to ask Claude Desktop: What are the best practices for error handling in Python?"
"Use get_conversations to list all my Claude Desktop conversations"
With custom timeout:
"Use the ask tool with timeout 60 to ask Claude Desktop: Explain B+ tree implementation"
"Use ask with timeout 10 and pollingInterval 0.5 to ask Claude Desktop: What is 2+2?"
Important: The MCP server configuration (shown above) only tells Claude how to start the server. The timeout and pollingInterval parameters are specified when you use the tool in Claude, not in the server configuration file.
Known Limitations
Response Reading
Due to Claude Desktop's Electron-based architecture, this MCP integration cannot read Claude's responses programmatically. The tool can successfully:
✅ Send prompts to Claude Desktop
✅ Create new conversations
✅ Activate and focus the Claude window
❌ Read Claude's responses back
This is a limitation of how Electron apps expose UI elements through accessibility APIs. When you use the ask tool, you'll receive a confirmation that the message was sent, but you'll need to check the Claude Desktop window directly to see the response.
Workarounds
Use Claude's API: For programmatic access to responses, consider using Claude's API directly instead of desktop automation
Manual verification: After sending a prompt, manually check the Claude Desktop window for the response
One-way automation: Use this tool for scenarios where you only need to send prompts without reading responses
Claude Commands Integration
Claude Commands allow you to create reusable workflows that combine MCP tools. This project works seamlessly with Claude Commands to enable powerful automation.
Example: Code Peer Review Command
We've included an example Claude Command that demonstrates how to use MCP Claude Desktop for automated code reviews. The command uses git to analyze recent changes and sends them to Claude Desktop for peer review feedback.
Setup
Copy the example command to your Claude Commands directory:
cp examples/claude-peer-review.md ~/.claude/commands/The command will be available in Claude Code as
/claude-peer-review
Usage
The peer review command accepts up to 3 arguments:
description: What changes to review (e.g., "authentication fix")
polling_interval: How often to check for response (default: 1.5s)
timeout: Maximum wait time for response (default: 30s)
Examples:
# Review most recent commit with defaults
/claude-peer-review
# Review with description
/claude-peer-review "bug fix for user login"
# Custom polling interval (2 seconds)
/claude-peer-review "API update" 2
# Custom timeout for complex reviews (2 minutes)
/claude-peer-review "major refactor" 1.5 120How It Works
Git Integration: The command automatically fetches:
Current git status
Recent commit statistics
Full diff of changes
Current branch name
Claude Desktop Review: Sends the changes to Claude Desktop with specific review questions:
Code appropriateness and implementation quality
Security concerns or potential bugs
Code quality and best practices
Suggestions for improvements
Response Handling: Uses the MCP server's polling mechanism to wait for Claude's response
Summary Generation: Provides a structured summary of:
Changes reviewed
Claude's feedback
Actions taken based on feedback
Final review status
Creating Your Own Commands
You can create custom Claude Commands that leverage MCP Claude Desktop. Commands should:
Include the tools in the frontmatter:
--- allowed-tools: mcp__claude-desktop__ask, mcp__claude-desktop__get_conversations ---Use the MCP tools with appropriate parameters:
mcp__claude-desktop__ask prompt: "Your prompt here" timeout: 60 pollingInterval: 2Handle timeouts gracefully and suggest longer timeouts for complex queries
See the example command for a complete implementation.
Development
Running in Development Mode
npm run devRunning Tests
npm testLinting
npm run lintType Checking
npm run typecheckAPI
Tools
ask
Send a prompt to Claude Desktop and get a response.
Parameters:
prompt(string, required): The prompt to sendconversationId(string, optional): Continue a specific conversationtimeout(number, optional): Response timeout in secondsDefault: 30 seconds
Minimum: 1 second
Maximum: 300 seconds (5 minutes)
pollingInterval(number, optional): How often to check for response in secondsDefault: 1.5 seconds
Minimum: 0.5 seconds
Maximum: 10 seconds
Response:
String containing Claude's responseget_conversations
Get a list of available conversations in Claude Desktop.
Parameters: None
Response:
{
conversations: string[];
timestamp: string;
}Architecture
The MCP server uses AppleScript to communicate with Claude Desktop:
Claude Code sends a prompt via MCP
AppleScript activates Claude Desktop and creates a new conversation
The prompt is typed into Claude Desktop
The server polls Claude Desktop for the response
Once a response is detected, it's parsed and returned to Claude Code
Troubleshooting
Common Issues
"AppleScript execution failed"
Ensure Claude Desktop is installed and running
Check accessibility permissions
Try running the server with higher log level:
LOG_LEVEL=3
"Response timed out"
Increase the timeout parameter:
timeout: 60(60 seconds)For complex queries, use longer timeouts:
timeout: 120(2 minutes)Reduce polling interval for faster detection:
pollingInterval: 0.5Check if Claude Desktop is responding normally
Ensure the system isn't under heavy load
"Permission denied"
Grant accessibility permissions to your terminal
Run the build command with proper permissions
MCP Server Crashes After Sending Requests If the MCP server crashes after handling requests, you can:
Disable response polling (recommended for stability):
export SKIP_CLAUDE_POLLING=trueThis will send the message to Claude Desktop but won't try to read the response.
Enable debug logging to see what's happening:
export LOG_LEVEL=3Check stderr output - All logs are now written to stderr to avoid interfering with the MCP protocol on stdout.
Known Limitations with Response Polling
Response polling can occasionally cause instability due to:
Extended polling duration (30 seconds default)
Complex UI element reading from Electron apps
Timing issues with Claude's response generation
Consider using SKIP_CLAUDE_POLLING=true for more reliable operation if you don't need response reading.
Contributing
We welcome contributions to MCP Claude Desktop! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Getting Started
Fork the repository
Clone your fork:
git clone https://github.com/YOUR_USERNAME/mcp-claude-desktop cd mcp-claude-desktopInstall dependencies:
npm installCreate a new branch:
git checkout -b feature/your-feature-name
Development Workflow
Make your changes
Run tests to ensure everything works:
npm testRun linting to maintain code quality:
npm run lintRun type checking:
npm run typecheckBuild the project:
npm run build
Code Style Guidelines
Use TypeScript for all source code
Follow the existing code style (enforced by ESLint)
Write meaningful commit messages
Add tests for new features
Update documentation as needed
Submitting Changes
Commit your changes with a descriptive message:
git commit -m "feat: add support for conversation history"Push to your fork:
git push origin feature/your-feature-nameCreate a Pull Request on GitHub
Pull Request Guidelines
Provide a clear description of the changes
Reference any related issues
Ensure all tests pass
Update README if adding new features
Be responsive to code review feedback
Reporting Issues
Use GitHub Issues to report bugs
Include macOS version and Node.js version
Provide steps to reproduce the issue
Include relevant error messages or logs
Feature Requests
Open an issue to discuss new features
Explain the use case and benefits
Be open to feedback and alternative approaches
License
MIT
Available Tools
2 toolsaskC
Send a prompt to Claude Desktop and get a response
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| conversationId | No | ||
| timeout | No | ||
| pollingInterval | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool sends a prompt and gets a response, implying a read/write interaction, but lacks details on permissions, rate limits, error handling, or response format. This is inadequate for a tool with 4 parameters and no output schema, leaving significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence: 'Send a prompt to Claude Desktop and get a response.' It is front-loaded with the core action and has no wasted words, making it highly concise and well-structured for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (4 parameters, 0% schema coverage, no annotations, no output schema), the description is incomplete. It doesn't cover parameter meanings, behavioral traits, or output details, leaving the agent with insufficient information to use the tool effectively. The conciseness doesn't compensate for these gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'prompt' implicitly but doesn't explain any of the 4 parameters (prompt, conversationId, timeout, pollingInterval) or their purposes. It adds minimal value beyond the schema, failing to compensate for the lack of coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Send a prompt to Claude Desktop and get a response.' It specifies the verb ('send') and resource ('Claude Desktop'), making the action clear. However, it doesn't differentiate from its sibling tool 'get_conversations,' which appears to be a different operation, so it doesn't fully distinguish from alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'get_conversations' or any other context for usage, such as prerequisites or scenarios. This leaves the agent without explicit direction on tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_conversationsB
Get a list of available conversations in Claude Desktop
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation which implies read-only behavior, but doesn't specify whether this requires authentication, what format the conversations are returned in, if there are rate limits, or how many conversations are returned (all vs paginated). The description is minimal and lacks important behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states exactly what the tool does without any wasted words. It's appropriately sized for a simple listing operation and gets straight to the point with no unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations, no output schema, and a simple purpose, the description is insufficient. It doesn't explain what 'available conversations' means, what format they're returned in, whether there are any filters or limitations, or what the response structure looks like. While the tool is simple, the description leaves too many unanswered questions about its behavior and output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to compensate for any parameter gaps, and it appropriately doesn't mention parameters since there are none. This meets the baseline expectation for a parameterless tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('list of available conversations in Claude Desktop'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling 'ask' tool, which appears to be a different type of operation rather than a direct alternative for listing conversations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives or in what context it should be invoked. While the sibling 'ask' tool seems functionally different (likely for querying rather than listing), the description doesn't mention this distinction or provide any usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have completely distinct purposes with no overlap: 'ask' is for sending prompts and getting responses, while 'get_conversations' is for retrieving conversation lists. An agent can easily tell them apart as they target different actions and resources.
The naming is mostly consistent with a verb-based pattern ('ask', 'get_conversations'), but there is a minor deviation: 'ask' uses a simple verb while 'get_conversations' follows a verb_noun format. This slight inconsistency is noticeable but does not hinder readability.
With only 2 tools, the count feels thin for a Claude Desktop server, which might be expected to handle more interactions like managing conversations or settings. While it covers basic prompt and conversation listing, the scope seems limited, bordering on under-scoped for the apparent domain.
There are significant gaps in the tool surface for a Claude Desktop server. It lacks operations for managing conversations (e.g., delete, rename), handling settings, or interacting with specific conversation details. This incomplete coverage could lead to agent failures when trying to perform common desktop tasks beyond basic prompting and listing.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to see and interact with any macOS application using natural language commands. Perfect for testing Mac applications, UI automation, and app development with AI assistance.32
- AlicenseNot gradedqualityDmaintenanceEnables high-speed native macOS automation for Claude by interacting directly with the Accessibility API, AppleScript, and UI trees instead of using screenshots. It allows users to read app states, click elements, and type text semantically across any macOS application.1310MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to send prompts to and receive responses from the ChatGPT desktop app on macOS, including starting new conversations.MIT
- AlicenseAqualityDmaintenanceConnects Claude Desktop to iMessage on macOS, enabling reading conversations, searching messages, sending texts, and managing attachments.713MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dpaluy/mcp-claude-desktop'
If you have feedback or need assistance with the MCP directory API, please join our Discord server