PythonCMCPServer

by maneeshsit

234 downloads Not rated yet

About

PythonCMCPServer is a tutorial for building a custom MCP (Model Context Protocol) server using Python. It demonstrates how to run an MCP server via uv and configure it with Claude Desktop.

Explore

- Uses Python and the mcp[cli] package.
- Run with uv run --with mcp[cli] mcp run <script>.
- Integrates with Claude Desktop via MCP.
- Supports multiple server definitions in config.

https://docs.astral.sh/uv/getting-started/installation/#installation-methods

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

https://claude.ai/download

claude_desktop_config.json
{
"mcpServers": {
"Demo": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\User\\Desktop\\MCPServerTutorial\\main.py"
]
},
"AI Sticky Notes": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\PythonCMCPServer\\main.py"
]
}
}
}

Building a Custom MCP Server using Python

Install UV

https://docs.astral.sh/uv/getting-started/installation/#installation-methods

Install UV for Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Install Claude Desktop

https://claude.ai/download

Edit Config

claude_desktop_config.json { "mcpServers": { "Demo": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "C:\\Users\\User\\Desktop\\MCPServerTutorial\\main.py" ] }, "AI Sticky Notes": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "C:\\PythonCMCPServer\\main.py" ] } } }
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.