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.

评论

其他 分类下的更多 MCP 服务器