Team MCP Server
Provides team information retrieval capabilities through HTTP streaming transport. Built with FastMCP 2.0+ and includes ngrok integration for easy testing and development.
README
Team MCP Server
A Model Context Protocol (MCP) server built with FastMCP 2.0+ that provides team information through HTTP streaming transport.
Quick Start
# Clone the repository
git clone <your-repo-url>
cd mcp-server
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
# Run the server
uv run python src/team_server.py
# Server is now running at http://localhost:8000/mcp
Test it with MCP Inspector:
# Install MCP Inspector (one-time setup)
npm install -g @modelcontextprotocol/inspector
# Run the inspector (in a new terminal)
npx @modelcontextprotocol/inspector http://localhost:8000/mcp
# Open browser to http://localhost:5173 to test your tools
That's it! Your MCP server is running and you can test it interactively with MCP Inspector.
Overview
This MCP server exposes tools for retrieving team information. It's designed for deployment on servers and includes ngrok integration for easy testing and development.
Prerequisites
- Python 3.10 or higher
- Either
uv(recommended) orpipfor package management - Node.js and npm (optional, for MCP Inspector)
- ngrok account (optional, for remote testing)
Installation
Option 1: Using uv (Recommended)
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
Option 2: Using pip
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Configuration
- Copy the example environment file:
cp .env.example .env
- Edit
.envto configure:MCP_HOST: Server host (default: 0.0.0.0)MCP_PORT: Server port (default: 8000)MCP_PATH: MCP endpoint path (default: /mcp)NGROK_AUTH_TOKEN: Your ngrok auth token (optional)
Running the Server
Local Development
# Using uv
uv run python src/team_server.py
# Using pip
python src/team_server.py
The server will start on http://localhost:8000/mcp using HTTP streaming transport.
With ngrok Tunnel
For remote testing or exposing your local server to the internet:
# Using uv
uv run python scripts/run_with_ngrok.py
# Using pip
python scripts/run_with_ngrok.py
# Or tunnel only (if server is already running)
uv run python scripts/run_with_ngrok.py --tunnel-only
This will:
- Start the MCP server locally (unless --tunnel-only is used)
- Create an ngrok tunnel
- Display the public URL you can use to access your server remotely
API Documentation
Endpoint
- URL:
http://localhost:8000/mcp(or your configured host/port/path) - Transport: HTTP streaming (FastMCP 2.3+)
- Protocol: Model Context Protocol
Available Tools
get_team_name
Returns the name of the team.
Parameters: None
Returns:
{
"result": "team1"
}
Example Usage with MCP Client:
from fastmcp.client import Client
async with Client("http://localhost:8000/mcp") as client:
result = await client.call_tool("get_team_name", {})
print(result) # Returns "team1"
Testing
Using MCP Inspector (Recommended)
MCP Inspector provides a web-based UI to test your MCP server's tools interactively.
- Install MCP Inspector globally:
npm install -g @modelcontextprotocol/inspector
- Start your MCP server:
uv run python src/team_server.py
- In a new terminal, run the Inspector:
npx @modelcontextprotocol/inspector http://localhost:8000/mcp
-
Open your browser to the URL shown (typically
http://localhost:5173) -
In the Inspector UI, you can:
- View all available tools
- Test the
get_team_nametool interactively - See request/response details
- Inspect the server's capabilities
Using the Test Client
- Start the server:
uv run python src/team_server.py
- Test with the provided test client:
uv run python test_client.py
- Or test with a remote URL using ngrok:
uv run python test_client.py https://your-ngrok-url.ngrok-free.app/mcp
Remote Testing with ngrok
- Start server with ngrok:
uv run python scripts/run_with_ngrok.py
- Use the displayed public URL (e.g.,
https://abc123.ngrok.io/mcp) to connect from any MCP client.
Development
Adding New Tools
To add new tools, edit src/team_server.py:
@mcp.tool()
def your_new_tool(param: str) -> str:
"""Description of your tool"""
return f"Result for {param}"
Updating Dependencies
When adding new dependencies:
- Add to
pyproject.toml - Regenerate
requirements.txt:
uv pip compile pyproject.toml > requirements.txt
- Install:
- uv:
uv sync - pip:
pip install -r requirements.txt
- uv:
Deployment
For production deployment:
- Set environment variables appropriately
- Use a process manager like systemd or supervisor
- Consider using a reverse proxy (nginx, Apache) for SSL termination
- Ensure firewall rules allow traffic on your configured port
Example systemd service
[Unit]
Description=Team MCP Server
After=network.target
[Service]
Type=simple
User=your-user
WorkingDirectory=/path/to/mcp-server
Environment="PATH=/usr/bin:/usr/local/bin"
ExecStart=/usr/bin/python /path/to/mcp-server/src/team_server.py
Restart=always
[Install]
WantedBy=multi-user.target
Troubleshooting
Server won't start
- Check Python version:
python --version(needs 3.10+) - Verify all dependencies are installed
- Check if port 8000 is already in use
ngrok issues
- Ensure you have an ngrok account and auth token
- Check ngrok status at https://dashboard.ngrok.com
- Verify firewall isn't blocking ngrok
MCP client can't connect
- Verify server is running and accessible
- Check the endpoint URL is correct
- Ensure you're using HTTP streaming transport (not SSE)
License
MIT License - see LICENSE file for details
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。