MCP.so
登录

CustomMCPServer

@abhimvp

关于 CustomMCPServer

build a custom MCP server in Python and connect that to an AI agent.

基本信息

分类

其他

运行时

python

传输方式

stdio

发布者

abhimvp

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "CustomMCPServer": {
      "command": "uv",
      "args": [
        "init",
        "."
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is CustomMCPServer?

CustomMCPServer is a tutorial and code example for building a custom MCP (Model Context Protocol) server in Python. It demonstrates how to create a server that exposes data and functionality to LLM applications in a secure, standardized way, similar to a web API but designed for LLM interactions.

How to use CustomMCPServer?

Start by creating a uv‑managed project with uv init ., then add the MCP CLI dependency with uv add "mcp[cli]". Activate the virtual environment, run uv run mcp install main.py to install the server in Claude Desktop, and restart the Claude app to see the server appear. For an advanced server, add black and then run uv run mcp install adv_main.py.

Key features of CustomMCPServer

  • Expose data through Resources (load information into LLM context)
  • Provide functionality through Tools (execute code or produce side effects)
  • Define interaction patterns through Prompts (reusable LLM templates)
  • Built on the Python MCP Server SDK
  • Can be installed directly into Claude Desktop

Use cases of CustomMCPServer

  • Connect a database and ask Claude to create fake users automatically
  • Automate repetitive tasks by exposing custom tools to an AI agent
  • Build a secure, standardized interface between LLMs and your own data or APIs

FAQ from CustomMCPServer

What is MCP?

MCP (Model Context Protocol) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. It separates the concerns of providing context from the actual LLM interaction.

What dependencies are required to run CustomMCPServer?

You need Python, uv (the project manager), and the mcp[cli] package. For the advanced server, black is also added.

How do I install the server in Claude Desktop?

Run uv run mcp install main.py (or uv run mcp install adv_main.py for the advanced version). This adds the server to Claude’s configuration file (claude_desktop_config.json).

How do I troubleshoot if the server does not appear in Claude?

Close the Claude app completely (use Task Manager to end the process), wait a moment, then reopen the app. The MCP server should spin up and appear.

Can I create custom tools with CustomMCPServer?

Yes. The tutorial shows how to add tools (e.g., to connect to a database) and then ask Claude to use them, such as creating 100 fake users automatically.

评论

其他 分类下的更多 MCP 服务器