Dictionary Lookup MCP Server
词典查询 MCP 服务器
一个基于官方 Python SDK 构建的极简 模型上下文协议 服务器。它暴露了一个工具 define,用于通过免费的 dictionaryapi.dev API 查询英文单词的定义。
本项目是作为学习练习而构建的,旨在理解 MCP 服务器是如何构建的、如何与客户端通信,以及如何公开部署。
功能
暴露一个工具:
define(word: str) -> str给定一个单词,返回其词性和定义
无需 API 密钥或身份验证
Related MCP server: yifanli-mcp-add-demo
环境要求
Python 3.10+
uv(推荐)或 pip
本地设置
# 1. Clone this repo
git clone <your-repo-url>
cd my-mcp-server
# 2. Install dependencies
uv sync本地运行
选项 A — MCP Inspector(可视化测试工具,最适合初学者):
uv run mcp dev server.py这会打开一个基于浏览器的检查器,您可以直接调用 define 工具并查看请求/响应,而无需完整的 AI 客户端。
选项 B — 连接到 Claude Desktop:
将以下内容添加到您的 Claude Desktop 配置文件(claude_desktop_config.json)中:
{
"mcpServers": {
"dictionary-lookup": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/my-mcp-server",
"run",
"server.py"
]
}
}
}重启 Claude Desktop,然后询问类似这样的问题: "使用词典工具查询 'ephemeral' 的定义。"
使用示例
输入: define("ephemeral")
输出: ephemeral (形容词):持续很短的时间。
部署
此服务器已发布在 Smithery 上:<部署后添加链接>
要部署您自己的副本:
将此仓库推送到 GitHub。
确保
server.py支持streamable-http传输以进行远程托管。托管它(例如 Render/Railway),或使用 Smithery 的发布流程。
在 Smithery 上,选择"通过 URL 发布",并将其指向您托管的服务器端点。
为什么做这个项目
为了学习 MCP 的基础知识:客户端如何发现服务器的工具、工具调用如何被发起和响应,以及一个可用的服务器如何通过像 Smithery 这样的市场公开分享。
Available Tools
1 tooldefineA
Look up the definition of an English word and return it as text.
Inputs: word (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of confusing it with another tool. Its purpose is immediately clear and unambiguous.
The single tool name 'define' is a clear imperative verb that matches its action. With only one tool, there are no mixed naming conventions or inconsistencies.
One tool feels thin for a server labeled as a dictionary lookup service, though it does cover the core definition lookup need. It is borderline rather than extreme.
The core lookup functionality is covered well, but a dictionary server might reasonably include related operations like synonyms, usage examples, or pronunciation. These are minor gaps rather than fatal omissions.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A Model Context Protocol server for Wix AI tools
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA minimal Model Context Protocol server built with FastAPI that provides a basic "Hello World" resource and tool. Serves as a starting point for building and validating MCP client integrations with richer resources and tools.-
- FlicenseBqualityNot gradedmaintenanceA minimal Model Context Protocol server that provides a simple tool for adding two integers. It serves as a demonstration of the official Python MCP SDK and is designed for local execution via stdio.1-
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- AlicenseAqualityDmaintenanceA minimal starting point for a Model Context Protocol server with stdio transport and one tool, enabling quick setup and custom tool addition.1ISC