Skip to main content
Glama
MaryamSarfraz77

Dictionary Lookup MCP Server

词典查询 MCP 服务器

一个基于官方 Python SDK 构建的极简 模型上下文协议 服务器。它暴露了一个工具 define,用于通过免费的 dictionaryapi.dev API 查询英文单词的定义。

本项目是作为学习练习而构建的,旨在理解 MCP 服务器是如何构建的、如何与客户端通信,以及如何公开部署。

功能

  • 暴露一个工具:define(word: str) -> str

  • 给定一个单词,返回其词性和定义

  • 无需 API 密钥或身份验证

Related MCP server: Hello World MCP FastAPI Endpoint

环境要求

  • 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 上:<部署后添加链接>

要部署您自己的副本:

  1. 将此仓库推送到 GitHub。

  2. 确保 server.py 支持 streamable-http 传输以进行远程托管。

  3. 托管它(例如 Render/Railway),或使用 Smithery 的发布流程。

  4. Smithery 上,选择"通过 URL 发布",并将其指向您托管的服务器端点。

为什么做这个项目

为了学习 MCP 的基础知识:客户端如何发现服务器的工具、工具调用如何被发起和响应,以及一个可用的服务器如何通过像 Smithery 这样的市场公开分享。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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.
  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal Model Context Protocol server that facilitates network-based client connections using Streamable HTTP transport. It provides a greeting tool and is optimized for consistent deployment across local environments, Docker, and Kubernetes.
    MIT
  • F
    license
    B
    quality
    Not graded
    maintenance
    A 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

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • MCP (Model Context Protocol) server for Appwrite

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MaryamSarfraz77/dictionary-lookup-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server