MCP.so
ログイン

MCP Server

@shaswata56

基本情報

カテゴリ

その他

ライセンス

MIT license

トランスポート

stdio

作者

shaswata56

MCP Server について

概要はまだありません

MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "basic-mcp-server": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは 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.

よくある質問

1

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.

2

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.

3

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.

4

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.

5

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.

コメント

「その他」の他のコンテンツ