Model Context Protocol (MCP) Server
@shaswata56
Model Context Protocol (MCP) Server について
概要はまだありません
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"basic-mcp-server": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is Model Context Protocol (MCP) Server?
A modular server implementing the Model Context Protocol for AI services, supporting multiple transport options (stdio, TCP, WebSocket) and dynamic AI service selection (Claude, OpenAI, mock). It is built with SOLID principles for maintainability and extensibility, and is intended for developers building AI-powered tools and applications.
How to use Model Context Protocol (MCP) Server?
Install by cloning the repository, creating a virtual environment, and running pip install -e .. Configure API keys in the .env file (or via command‑line flags). Run with python mcp_server.py for stdio mode, add --tcp for TCP mode, or --websocket for WebSocket mode. Example clients are provided in the examples/ directory.
Key features of Model Context Protocol (MCP) Server
- Multiple AI services: Claude, OpenAI, and mock.
- Dynamic per‑request AI service selection.
- Three transport modes: stdio, TCP, and WebSocket.
- Compliant JSON‑RPC 2.0 interface.
- Real‑time response streaming for supported transports.
- Easy extension with custom handlers, services, and transports.
Use cases of Model Context Protocol (MCP) Server
- Command‑line AI assistants using stdio transport.
- Network‑based AI tools (e.g., chatbots) over TCP.
- Real‑time browser applications via WebSocket.
- Testing AI integrations without external API calls (mock service).
- Multi‑service AI systems that switch between providers per query.
FAQ from Model Context Protocol (MCP) Server
What AI services are supported and how do I switch between them?
The server supports Claude, OpenAI, and a mock service. You can set a default via the AI_SERVICE_TYPE environment variable or override it per request by passing the service_name argument (e.g., "claude", "openai", "mock") in the ai/message tool call.
How do I configure API keys?
API keys can be provided in the .env file (using ANTHROPIC_API_KEY and OPENAI_API_KEY), passed as command‑line arguments (--claude-api-key, --openai-api-key), or stored in a JSON secrets file pointed to by the SECRETS_FILE environment variable.
Which transport modes are available and how do I start them?
Three transports are available: stdio (default), TCP (--tcp), and WebSocket (--websocket). For TCP/WebSocket you can optionally set the host, port, and WebSocket path. Use environment variables or command‑line flags to configure them.
Is there a way to restrict which origins can connect via WebSocket?
Yes. Set the MCP_WS_ORIGINS environment variable to a comma‑separated list of allowed origins. By default all origins are permitted.
What are the runtime dependencies and required Python version?
The server requires Python and the packages listed in the project’s setup.py or requirements.txt. API keys for Claude or OpenAI are needed for production use; the mock service works without any external API.
「その他」の他のコンテンツ
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
ghidraMCP
LaurieWiredMCP Server for Ghidra
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
コメント