MCP Integration¶
Savanty can run as a Model Context Protocol (MCP) server, allowing integration with AI assistants like Claude.
What is MCP?¶
Model Context Protocol is a standard for connecting AI assistants to external tools and data sources. When Savanty runs as an MCP server, AI assistants can directly invoke it to solve optimization problems.
Starting the MCP Server¶
The server communicates via stdin/stdout using the MCP protocol.
Available Tools¶
solve_optimization¶
Solves an optimization problem described in natural language.
Input:
Output:
Or on error:
Integration with Claude Desktop¶
Add Savanty to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"savanty": {
"command": "savanty",
"args": ["--mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key"
}
}
}
}
After configuration, Claude can use Savanty to solve optimization problems directly in conversations.
Usage in Claude¶
Once configured, you can ask Claude:
"Use Savanty to schedule 4 employees for morning and evening shifts this week"
Claude will invoke Savanty's MCP tool and present the solution.
Requirements¶
- FastMCP package (included with Savanty)
- Valid OpenAI API key
- Claude Desktop or other MCP-compatible client
Troubleshooting¶
"fastmcp package not installed"¶
Install the missing dependency:
Or reinstall Savanty:
Server doesn't respond¶
Check that:
OPENAI_API_KEYis set in the MCP server environment- The command path is correct
- No other process is blocking stdin/stdout
Testing the MCP Server¶
Test manually:
Should return the available tools.