
Smithery Ai Cookbook Python Quickstart
ai.smithery由 smithery.ai 发布官方发布者v1.13.1更新于 Oct 24, 2026
A simple MCP server built with FastMCP and python
发布方自己的服务:222wcnm Bilistalkermcp
概览
一个用 FastMCP 和 Python 编写的最小示例服务器,只提供一个字符计数工具,以 Smithery 远程端点形式运行。
- 可以做什么
- 统计字符:唯一的 count_character 工具返回指定字符在给定文本中出现的次数。
- 作为教学示例:README 演示如何用 FastMCP 构建、运行并部署到 Smithery,并可用本地 Playground 查看请求与响应。
- 适用场景
- 适合在学习如何构建和部署 FastMCP 服务器时作为参考或连通性测试,或用来验证 MCP 客户端能否连接远程端点。除此之外没有实际业务价值。
- 运行要求
- 远程 streamable HTTP 端点(server.smithery.ai),需在 Authorization 请求头中提供 bearer 令牌。若在本地运行示例,则需要 Python 3.12 或更高版本、uv 等 Python 包管理器,以及可选的 Node.js 与 npx(用于 Smithery Playground)。
安装
在 SourceWeft 中
- 打开 控制台中的 Smithery Ai Cookbook Python Quickstart,将其添加到工作区。
- 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/ai.smithery%2Fsmithery-ai-cookbook-python-quickstart/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"smithery-ai-cookbook-python-quickstart": {
"type": "http",
"url": "https://server.smithery.ai/@smithery-ai/cookbook-python-quickstart/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
Character Counter MCP Server - Python Quickstart
A simple example of creating an MCP server using FastMCP and Python, designed to work with Smithery.
What This Does
This server provides a character counter tool called count_character that counts how many times a specific character appears in a given text. You'll test it using the Smithery Playground for interactive development.
Prerequisites
- Python 3.12 or higher
- A Python package manager (uv recommended, but pip, poetry, etc. also work)
- Node.js and npx (optional, for Smithery Playground)
Quick Start
-
Clone the repository:
-
Install dependencies:
With uv (recommended):
With poetry:
With pip:
-
Run the server:
You have two options:
Option A: Just run the server
This starts the MCP server on
http://localhost:8081and keeps it running.Option B: Run server + open playground (recommended for testing)
This starts the MCP server AND automatically opens the Smithery Playground in your browser where you can:
- Interact with your MCP server in real-time
- Test the
count_charactertool with different text and characters - See the complete request/response flow
- Debug and iterate on your MCP tools quickly
Testing the Character Counter
Try asking: "How many r's are in strawberry?"
- Deploy to Smithery:
To deploy your MCP server:
- Push your code to GitHub (make sure to include the
smithery.yaml) - Connect your repository at https://smithery.ai/new
- Push your code to GitHub (make sure to include the
Your server will be available over HTTP and ready to use with any MCP-compatible client!
Stopping the Server
Press Ctrl+C in the terminal to stop the server.
来源:servers/python/quickstart/README.md,提交 2bf1e95
工具
0版本历史
1- v1.13.1最新Sep 16, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具必需15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Smithery 集成

222wcnm Bilistalkermcp
ai.smithery官方发布者
Bilibili 创作者分析服务器,让助手查询指定用户的资料、视频、动态、专栏、字幕、关注列表和评论。

Zwldarren Akshare One Mcp
ai.smithery官方发布者
远程 MCP 服务器,让助手以只读方式获取中国股市数据:历史与实时行情、新闻和财务报表。

Zhaoganghao Hellomcp
ai.smithery官方发布者
一个小型远程 MCP 服务器,让助手按名字向人问候,并介绍“Hello, World”的由来。

Zeta Chain Cli
ai.smithery官方发布者
一个远程 MCP 服务器,让助手为任意姓名或受众生成友好、可定制的问候语。

Yuna0x0 Hackmd Mcp
ai.smithery官方发布者
一个连接 HackMD API 的 MCP 服务器,让助手读取、创建、更新和删除 HackMD 笔记并管理团队。