
mcp python
该项目演示了如何使用 FastMCP 服务器,并提供了相关工具和资源。
Repository Info
About This Server
该项目演示了如何使用 FastMCP 服务器,并提供了相关工具和资源。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
mcp-python
This project demonstrates the usage of the FastMCP server with tools and resources.
Installation
-
Clone the repository:
git clone <repository-url> cd mcp-python -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install the required dependencies:
pip install -r requirements.txt
Running the Server
-
Start the MCP server:
uvicorn server:mcp --host 0.0.0.0 --port 3000This will start the server on
http://localhost:3000.
Running Tests
Unit Tests
Run the unit tests for the server:
python -m unittest test_server.py
cURL Tests
Run the cURL-based tests:
python test_ssh_curl.py
Ensure the server is running on http://localhost:3000 before executing the cURL tests.
Tools and Resources
-
Tools:
add: Adds two numbers. Accessible via/tools/add.
-
Resources:
greeting://{name}: Returns a personalized greeting. Accessible via/resources/greeting://{name}.
Quick Start
Clone the repository
git clone https://github.com/rohithtp/mcp-pythonInstall dependencies
cd mcp-python
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.