Using MCPSDK with Claude Desktop
Requirements: MCPSDK
MCP SDK is a flexible MCP (Model Context Protocol) implementation that enables easy integration with LLMs and MCP hosts. It enables applications to expose custom tools, prompts, and resources to enhance LLM interactions across multiple programming languages.
Introduction
MCP hosts are AI-powered applications that enable large language models (LLMs) to interact with external tools, data, and logic through the Model Context Protocol. The MCPServer component of the MCP SDK makes it easy to build a server that exposes these capabilities to any compatible host.
Whether you're integrating with Claude Desktop, VS Code, or another MCP Host, the MCPServer component enables exposing custom functionality, data sources, and pre-defined prompts in a way models can access programmatically. This article walks through how to connect your MCP server to Claude Desktop and begin customizing your LLM-powered workflows.
Connecting to Claude Desktop
Before getting started:
- Install the MCP SDK
- Run the included demo locally to confirm it starts correctly.
- Record the full command you typically use to start your server, making sure to include absolute paths.
For example:
- C# (if compiled to an executable):
C:/Path/To/Server/MCPServerDemo.exe
- Java:
java -cp path/to/your.jar package.ServerMain
Step 1: Install Claude Desktop
- Download Claude Desktop from:
https://claude.ai/download
- Create an account and install the desktop application.
Step 2: Enable Developer Mode
-
Open Claude Desktop
-
Click the menu in the upper-left corner
-
Navigate to: Help → Troubleshooting → Enable Developer Mode
-
Confirm in the popup dialog
-
Restart Claude if the Developer section does not appear immediately
Step 3: Configure MCP Server Integration
-
Open the menu
-
Select Developer → Open App Config File
If this is your first MCP project, the config file may be empty or contain minimal content
-
Add your MCP server to the configuration file with the following structure:
A .Net MCP Server Config file:
{
"mcpServers": {
"MCPSDKcs": {
"command": "C:/Users/$USERNAME/Documents/MCP SDK 2024 .NET Edition/demos/Server/bin/Debug/net6.0/server.exe",
"args": []
}
}
}
A Java MCP Server Config file:
{
"mcpServers": {
"MCPSDKJava": {
"command": "java",
"args": [
"-cp",
"C:/Users/$USERNAME/Documents/MCP SDK 2024 Java Edition/lib/mcpsdk.jar;C:/Users/$USERNAME /Documents/MCP SDK 2024 Java Edition/demos/Server/out/production/server",
"ServerMain"
]
}
}
}
In C# you only need to replace the path with the actual path to your server executable. No additional arguments are required.
In Java you must pass the location of the .jar file as well as the location of the compiled class files.
After saving the file:
-
Return to Claude Desktop
-
Select Developer → Reload MCP Configuration from the menu
Step 4: Verifying the Integration
Start a new chat in Claude Desktop. Under the prompt bar, click the + menu and choose Add from MCPSDK. You should now see:
-
The server's source file (e.g., .java, .cs)
-
A Code Review Prompt
In that menu there should now be an option to Add from MCPSDK.
Selecting the resource will attach it to your chat. You can now prompt Claude Desktop with things like "Tell me about this file," and it will reference the attached source. Claude Desktop may continue to use the resource during the conversation without needing to re-attach it. The resource will remain active until the chat ends.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.