Voitta 网关
STDIO通过MCP协议提供Voitta库功能的网关
通过MCP协议提供Voitta库功能的网关
This MCP server provides a gateway to the Voitta library, allowing you to use Voitta's capabilities through the Model Context Protocol (MCP). It supports both STDIO and SSE transports.
requirements.txt
(including voitta)pip install -r requirements.txt
The server reads the Voitta configuration from a YAML file. By default, it looks for the file at /Users/gregory/g/projects/llm/roma/voitta-example/config/voitta.yaml
, but you can specify a different path using the CONFIG_PATH
environment variable.
The configuration file should follow the format expected by the Voitta library. Refer to the Voitta documentation for details on the configuration format.
You can run the server directly from VSCode using the provided launch configuration.
Run the server using:
python server.py
For HTTP mode (SSE transport):
FASTMCP_HTTP=1 PORT=10000 python server.py
The MCP Inspector is a useful tool for testing and debugging MCP servers. Here's how to use it with the Voitta Gateway:
Start the MCP Inspector:
npx @modelcontextprotocol/inspector
Open the inspector console at http://localhost:5173
For STDIO transport (recommended for testing), use one of these options:
Option 1: Using python directly
python
(or python3
depending on your system)server.py
Option 2: Using uv
uv
run --with fastmcp --with pyyaml --with voitta --with pydantic server.py
Option 3: Using fastmcp with full paths
/path/to/your/fastmcp
(e.g., /Users/gregory/g/projects/llm/roma/mcp-voitta-gateway/.venv/bin/fastmcp
)run /full/path/to/server.py
(e.g., run /Users/gregory/g/projects/llm/roma/mcp-voitta-gateway/server.py
)Option 4: Using cd and fastmcp
bash
(or your shell)-c "cd /Users/gregory/g/projects/llm/roma/mcp-voitta-gateway && fastmcp run server.py"
Click "Connect" to establish a connection to the server
Once connected, you can:
voitta://tools
resource to see all Voitta toolsFor HTTP/SSE transport:
FASTMCP_HTTP=1 PORT=10000 python server.py
http://localhost:10000
The server automatically registers all tools provided by the Voitta library. You can get a list of available tools using the voitta://tools
resource.
Additionally, the server provides the following MCP tools:
get_voitta_tool_info
: Get detailed information about a specific Voitta tool, including its parameters and descriptions.fastmcp install server.py --name "voitta-gateway"
Follow the Cline documentation for installing MCP servers.