Token导航 LogoToken导航TokenDH.com
Custom MCP Server logo
开发工具stdio官方级别未说明来源级核验

Custom MCP Server

MCP Server

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

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
上下文管理PythonClaude自动化Claude DesktopClaudeVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

abhimvp

提供方

abhimvp

最后核验

2026/5/18 04:04

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

自定义MCP服务器

用Python构建一个自定义MCP服务器,并将其连接到AI代理。

  • 资源:

- Python MCP服务器SDK - 参考代码

  • MCP服务器本质上是LLM和AI工具相互通信的方式。模型上下文协议允许应用程序以标准化的方式为LLM提供上下文,将提供上下文的关注点与实际的LLM交互分开。
# create a uv-managed project
$ uv init .
Initialized project `custommcpserver` at `C:\Users\abhis\Desktop\AIAgents\CustomMCPServer`
# Then add MCP to your project dependencies:
$ uv add "mcp[cli]"
# activate python environment as well
$ source .venv/scripts/activate
# You can install this server in Claude Desktop and interact with it right away by running:
# mcp install main.py
# since we're in this vs code we do
$ uv run mcp install main.py
[04/16/25 10:06:31] INFO     Added server 'Demo' to Claude config
                    INFO     Successfully installed Demo in Claude app
# go to claude app > File > settings > Developer > Edit Config - opens up some file and open that claude_desktop_config.json file
# we can see the mcp run main.py(path) is added in that file.
# the mcp server should show up on claude app - if it's not - we do the following
# close claude app - open task manager and search fo claude and right click & do end task.
# wait a sec & open the app again
#  once the app loads , it spins up the mcp server and it shows on app - refer the image below & when you click on tool we can see the
# add tool and server:DEMO

alt text alt text alt text

高级MCP服务器

  • 在我们继续之前, 什么是MCP?:

- 让您构建 服务器 那 _暴露数据_ 以安全、标准化的方式为LLM应用程序提供功能。将其视为一个web API,但它是专门为LLM交互而设计的。 - 通过以下方式公开数据 资源 (将这些类似于GET端点;它们用于将信息加载到LLM的上下文中) - 通过以下方式提供功能 工具 (有点像POST端点;它们用于执行代码或产生副作用) - 通过以下方式定义交互模式 鼓励 (LLM交互的可重用模板) - 还有更多!

uv add black
# after creating new mcp server & tool
$ uv run mcp install adv_main.py
[04/16/25 10:44:02] INFO     Added server 'AI Sticky Notes' to Claude config
                    INFO     Successfully installed AI Sticky Notes in Claude app

alt text alt text alt text alt text alt text alt text

  • 从上面的例子中,我们可以看到如何利用我们创建的工具,做任何我们想做的事情。
  • 添加一个连接到db的工具,并让claude在db中创建100个假用户,而不是我们手动复制粘贴。等等。我们可以自动化很多东西。

目录标签

目录标签

上下文管理PythonClaude自动化developer-toolsLLM通信本地部署AI工具集成Python开发自动化工具

支持客户端

Claude DesktopClaudeVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP