dynaroute-mcp-server


Namedynaroute-mcp-server JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryMCP server for DynaRoute - intelligent chat completions with automatic model routing and cost optimization
upload_time2025-07-08 11:34:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords mcp dynaroute ai llm cost-optimization model-routing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DynaRoute MCP Server

A Model Context Protocol (MCP) server that provides intelligent chat completions with automatic model routing and cost optimization through DynaRoute.

## Features

- 🧠 **Intelligent Model Routing**: Automatically routes queries to the most cost-effective model while maintaining quality
- 💰 **Cost Optimization**: Save up to 70% compared to premium models like GPT-4o
- 📊 **Detailed Analytics**: Get comprehensive metrics including token usage, costs, and performance data
- 🔍 **Routing Intelligence**: See exactly which model was selected and why
- ⚡ **Easy Integration**: Works seamlessly with Claude Desktop, Cursor, and other MCP-compatible clients

## Installation

Install via pip:

```bash
pip install dynaroute-mcp-server
```

## Quick Start

1. **Get your DynaRoute API key** from [DynaRoute](https://dynaroute.vizuara.com/)

2. **Configure Claude Desktop** by adding this to your `claude_desktop_config.json`:
   ```json
   {
     "mcpServers": {
       "dynaroute": {
         "command": "uv",
         "args": ["tool", "run", "dynaroute-mcp-server"],
         "env": {
           "DYNAROUTE_API_KEY": "YOUR_API_KEY"
         }
       }
     }
   }
   ```

3. **Restart Claude Desktop** and start using DynaRoute!

## Usage

Once configured, you can use DynaRoute in Claude Desktop by:

- **Asking for AI responses**: "Use DynaRoute to explain quantum computing"
- **Requesting cost analysis**: "Get a cost-optimized response about machine learning"
- **Explicit tool usage**: "Use the DynaRoute tool to answer this question"

## Example Output

When you use the DynaRoute tool, you'll get:

```
🤖 DynaRoute Response:
[Your AI response content here]

📊 PERFORMANCE METRICS:
• Model Used: gcp-gemini-2.0-flash-thinking
• Response Time: 2.5 seconds
• Request ID: chatcmpl-xyz123

🔢 TOKEN USAGE:
• Input Tokens: 25
• Output Tokens: 150
• Total Tokens: 175

💰 COST BREAKDOWN:
• Input Cost: $0.000012
• Output Cost: $0.000045
• Total Cost: $0.000057

📈 COST SAVINGS vs GPT-4o:
• GPT-4o Equivalent Cost: $0.000175
• Your Actual Cost: $0.000057
• Money Saved: $0.000118
• Savings Percentage: 67.4%

✅ EFFICIENCY SUMMARY: DynaRoute saved you 67.4% compared to GPT-4o while maintaining quality!
```

## Configuration

### Environment Variables

- `DYNAROUTE_API_KEY`: Your DynaRoute API key (required)

### Tool Parameters

The `dynaroute_chat` tool accepts:

- `messages`: Array of conversation messages (required)
- `level_override`: Override complexity level 1-5 (optional)

## Claude Desktop Configuration

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):

```json
{
  "mcpServers": {
    "dynaroute": {
      "command": "uv",
      "args": ["tool", "run", "dynaroute-mcp-server"],
      "env": {
        "DYNAROUTE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

## Other MCP Clients

### Cursor IDE
Add to your Cursor settings:
```json
{
  "mcp": {
    "servers": {
      "dynaroute": {
        "command": "uv",
        "args": ["tool", "run", "dynaroute-mcp-server"],
        "env": {
          "DYNAROUTE_API_KEY": "YOUR_API_KEY"
        }
      }
    }
  }
}
```

### Custom Usage
You can also import and use the server programmatically:

```python
import asyncio
from dynaroute_mcp import DynaRouteMCPServer

async def main():
    server = DynaRouteMCPServer(api_key="your_api_key")
    await server.run()

asyncio.run(main())
```

## Requirements

- Python 3.8+
- DynaRoute API key
- MCP-compatible client (Claude Desktop, Cursor, etc.)

## Dependencies

- `mcp`: Model Context Protocol implementation
- `dynaroute-client`: Official DynaRoute Python client

## License

MIT License

## Support

- 📧 Email: abraar237@gmail.com
- 🐛 Issues: [GitHub Issues](https://github.com/abraar237/dynaroute-mcp-server/issues)
- 📖 Documentation: [GitHub README](https://github.com/abraar237/dynaroute-mcp-server)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Changelog

### 1.0.0
- Initial release
- DynaRoute integration with MCP
- Cost optimization and analytics
- Claude Desktop support

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dynaroute-mcp-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mcp, dynaroute, ai, llm, cost-optimization, model-routing",
    "author": null,
    "author_email": "Mohammed Abraar <abraar237@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a6/56/a9d949e88a6b81b25b47d07dde137ba7b2d25b897625c3543e74fe920f87/dynaroute_mcp_server-1.0.2.tar.gz",
    "platform": null,
    "description": "# DynaRoute MCP Server\n\nA Model Context Protocol (MCP) server that provides intelligent chat completions with automatic model routing and cost optimization through DynaRoute.\n\n## Features\n\n- \ud83e\udde0 **Intelligent Model Routing**: Automatically routes queries to the most cost-effective model while maintaining quality\n- \ud83d\udcb0 **Cost Optimization**: Save up to 70% compared to premium models like GPT-4o\n- \ud83d\udcca **Detailed Analytics**: Get comprehensive metrics including token usage, costs, and performance data\n- \ud83d\udd0d **Routing Intelligence**: See exactly which model was selected and why\n- \u26a1 **Easy Integration**: Works seamlessly with Claude Desktop, Cursor, and other MCP-compatible clients\n\n## Installation\n\nInstall via pip:\n\n```bash\npip install dynaroute-mcp-server\n```\n\n## Quick Start\n\n1. **Get your DynaRoute API key** from [DynaRoute](https://dynaroute.vizuara.com/)\n\n2. **Configure Claude Desktop** by adding this to your `claude_desktop_config.json`:\n   ```json\n   {\n     \"mcpServers\": {\n       \"dynaroute\": {\n         \"command\": \"uv\",\n         \"args\": [\"tool\", \"run\", \"dynaroute-mcp-server\"],\n         \"env\": {\n           \"DYNAROUTE_API_KEY\": \"YOUR_API_KEY\"\n         }\n       }\n     }\n   }\n   ```\n\n3. **Restart Claude Desktop** and start using DynaRoute!\n\n## Usage\n\nOnce configured, you can use DynaRoute in Claude Desktop by:\n\n- **Asking for AI responses**: \"Use DynaRoute to explain quantum computing\"\n- **Requesting cost analysis**: \"Get a cost-optimized response about machine learning\"\n- **Explicit tool usage**: \"Use the DynaRoute tool to answer this question\"\n\n## Example Output\n\nWhen you use the DynaRoute tool, you'll get:\n\n```\n\ud83e\udd16 DynaRoute Response:\n[Your AI response content here]\n\n\ud83d\udcca PERFORMANCE METRICS:\n\u2022 Model Used: gcp-gemini-2.0-flash-thinking\n\u2022 Response Time: 2.5 seconds\n\u2022 Request ID: chatcmpl-xyz123\n\n\ud83d\udd22 TOKEN USAGE:\n\u2022 Input Tokens: 25\n\u2022 Output Tokens: 150\n\u2022 Total Tokens: 175\n\n\ud83d\udcb0 COST BREAKDOWN:\n\u2022 Input Cost: $0.000012\n\u2022 Output Cost: $0.000045\n\u2022 Total Cost: $0.000057\n\n\ud83d\udcc8 COST SAVINGS vs GPT-4o:\n\u2022 GPT-4o Equivalent Cost: $0.000175\n\u2022 Your Actual Cost: $0.000057\n\u2022 Money Saved: $0.000118\n\u2022 Savings Percentage: 67.4%\n\n\u2705 EFFICIENCY SUMMARY: DynaRoute saved you 67.4% compared to GPT-4o while maintaining quality!\n```\n\n## Configuration\n\n### Environment Variables\n\n- `DYNAROUTE_API_KEY`: Your DynaRoute API key (required)\n\n### Tool Parameters\n\nThe `dynaroute_chat` tool accepts:\n\n- `messages`: Array of conversation messages (required)\n- `level_override`: Override complexity level 1-5 (optional)\n\n## Claude Desktop Configuration\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"dynaroute\": {\n      \"command\": \"uv\",\n      \"args\": [\"tool\", \"run\", \"dynaroute-mcp-server\"],\n      \"env\": {\n        \"DYNAROUTE_API_KEY\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n## Other MCP Clients\n\n### Cursor IDE\nAdd to your Cursor settings:\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"dynaroute\": {\n        \"command\": \"uv\",\n        \"args\": [\"tool\", \"run\", \"dynaroute-mcp-server\"],\n        \"env\": {\n          \"DYNAROUTE_API_KEY\": \"YOUR_API_KEY\"\n        }\n      }\n    }\n  }\n}\n```\n\n### Custom Usage\nYou can also import and use the server programmatically:\n\n```python\nimport asyncio\nfrom dynaroute_mcp import DynaRouteMCPServer\n\nasync def main():\n    server = DynaRouteMCPServer(api_key=\"your_api_key\")\n    await server.run()\n\nasyncio.run(main())\n```\n\n## Requirements\n\n- Python 3.8+\n- DynaRoute API key\n- MCP-compatible client (Claude Desktop, Cursor, etc.)\n\n## Dependencies\n\n- `mcp`: Model Context Protocol implementation\n- `dynaroute-client`: Official DynaRoute Python client\n\n## License\n\nMIT License\n\n## Support\n\n- \ud83d\udce7 Email: abraar237@gmail.com\n- \ud83d\udc1b Issues: [GitHub Issues](https://github.com/abraar237/dynaroute-mcp-server/issues)\n- \ud83d\udcd6 Documentation: [GitHub README](https://github.com/abraar237/dynaroute-mcp-server)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Changelog\n\n### 1.0.0\n- Initial release\n- DynaRoute integration with MCP\n- Cost optimization and analytics\n- Claude Desktop support\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MCP server for DynaRoute - intelligent chat completions with automatic model routing and cost optimization",
    "version": "1.0.2",
    "project_urls": {
        "Documentation": "https://github.com/abraar237/dynaroute-mcp-server#readme",
        "Homepage": "https://github.com/abraar237/dynaroute-mcp-server",
        "Issues": "https://github.com/abraar237/dynaroute-mcp-server/issues",
        "Repository": "https://github.com/abraar237/dynaroute-mcp-server"
    },
    "split_keywords": [
        "mcp",
        " dynaroute",
        " ai",
        " llm",
        " cost-optimization",
        " model-routing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ee364b3186374a21fba35f7abcfa2182ab51a6bac87aa881e3d53b96abd406ef",
                "md5": "635ca00a88ea7974d380d76f6a994cd4",
                "sha256": "bfb9783e89d3aef913ad06fb3a04c657fb8cccd00ed87fdf91b50f193ff2d279"
            },
            "downloads": -1,
            "filename": "dynaroute_mcp_server-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "635ca00a88ea7974d380d76f6a994cd4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8325,
            "upload_time": "2025-07-08T11:34:43",
            "upload_time_iso_8601": "2025-07-08T11:34:43.458731Z",
            "url": "https://files.pythonhosted.org/packages/ee/36/4b3186374a21fba35f7abcfa2182ab51a6bac87aa881e3d53b96abd406ef/dynaroute_mcp_server-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a656a9d949e88a6b81b25b47d07dde137ba7b2d25b897625c3543e74fe920f87",
                "md5": "26f5a65009fc2a91428097633b8e0ee0",
                "sha256": "73a328917470f6edab05f9371f016d174523ea1b887ba189f2b07144204da678"
            },
            "downloads": -1,
            "filename": "dynaroute_mcp_server-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "26f5a65009fc2a91428097633b8e0ee0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7369,
            "upload_time": "2025-07-08T11:34:44",
            "upload_time_iso_8601": "2025-07-08T11:34:44.905500Z",
            "url": "https://files.pythonhosted.org/packages/a6/56/a9d949e88a6b81b25b47d07dde137ba7b2d25b897625c3543e74fe920f87/dynaroute_mcp_server-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-08 11:34:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "abraar237",
    "github_project": "dynaroute-mcp-server#readme",
    "github_not_found": true,
    "lcname": "dynaroute-mcp-server"
}
        
Elapsed time: 0.60802s