mcp-server
A simple, extensible MCP server implementation for local use with tools like Copilot Chat, enabling context management and protocol-compliant communication.
README
Model Context Protocol (MCP) Server
The Model Context Protocol (MCP) Server is a server implementation that adheres to the Model Context Protocol. It is designed to facilitate communication between clients and models in a standardized way, enabling seamless integration and interaction.
Reference MCP Python SDK
This project aims to provide an example of a simple custom MCP server that can be used locally with tools like Copilot Chat. It demonstrates how to set up a server that can respond to requests and manage context information for clients.
Features
- Context Management: The MCP Server manages context information for each client, allowing models to access relevant data and state information.
- Protocol Compliance: The server strictly follows the MCP specifications, ensuring compatibility with other MCP-compliant clients and services.
- Extensibility: The server is designed to be easily extensible, allowing developers to add new features and capabilities as needed.
Getting Started
To get started with the MCP Server, follow these steps:
Install UV Trying out UV instead of pip for this project: UV install methods
curl to download the script and pipe it to sh:
$ curl -LsSf https://astral.sh/uv/install.sh | sh
Add $HOME/.local/bin to your PATH:
$ source $HOME/.local/bin/env
Create a uv-managed project:
$ uv init .
Add MCP to the project dependencies:
$ uv add "mcp[cli]"
Test the MCP Server You can test the MCP Server by running the following command:
$ uv run mcp dev main.py
Run the MCP Server
For integration with Copilot Chat, we need to create .vscode/mcp.json in the project root with the following content to the servers section
"mcp-server": {
"type": "stdio",
"command": "<uvPath>",
"args": [
"run",
"main.py"
]
}
Then you can add the MCP resource to Copilot chat.. after that Copilot will have access to the defined resources and tools.
Here is an example of Copilot interacting with the greeting tool.
Hello, Ken! 🎉
I can see your MCP server is working beautifully - it just provided me with a
personalized greeting for you! It's fantastic to see your Model Context
Protocol server in action, dynamically generating content based on context.
Your MCP server setup looks solid with UV package management, and it's clearly
functioning well if it's able to serve up dynamic greetings through the protocol.
This is exactly the kind of extensible, context-aware functionality that makes MCP
so powerful!
What would you like to explore or build next with your MCP server, Ken? Whether
it's adding more dynamic resources, enhancing the greeting functionality, or
working on other features, I'm here to help! 🚀
To run the MCP Server manually, use the following command:
// With Claude
$ uv run mcp install main
// Else
$ uv run main.py
API Reference
The MCP Server exposes a RESTful API for communication with clients. Refer to the API documentation for detailed information on available endpoints, request/response formats, and authentication requirements.
Contributing
Contributions to the MCP Server are welcome! If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Submit a pull request for review.
License
The MCP Server is licensed under the MIT License. See the LICENSE file for more information.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。