send-message
Send messages to Claude through the Claude Desktop API MCP server to bypass Professional Plan limitations and access advanced features like custom system prompts.
Instructions
Send a message to Claude
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Message to send to Claude |
Implementation Reference
- src/index.ts:51-78 (handler)Handler for the 'send-message' tool: checks the tool name, calls the Anthropic Claude API with the message from arguments, extracts the text response, and returns it as content.if (request.params.name === "send-message" && request.params.arguments?.message) { try { const msg = await client.messages.create({ model: "claude-3-opus-20240229", max_tokens: 1024, messages: [ { role: "user", content: String(request.params.arguments.message) } ] }); const responseText = msg.content[0].type === 'text' ? msg.content[0].text : 'No text response available'; return { content: [ { type: "text", text: responseText } ] }; } catch (error) { log(`Error calling Claude API: ${error}`); throw error; } }
- src/index.ts:30-43 (registration)Registration of the 'send-message' tool in the ListTools response, specifying name, description, and input schema.{ name: "send-message", description: "Send a message to Claude", inputSchema: { type: "object", properties: { message: { type: "string", description: "Message to send to Claude" } }, required: ["message"] } }
- src/index.ts:33-42 (schema)Input schema definition for the 'send-message' tool, requiring a 'message' string.inputSchema: { type: "object", properties: { message: { type: "string", description: "Message to send to Claude" } }, required: ["message"] }