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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.