strata-mcp


Namestrata-mcp JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2025-10-28 01:50:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseApache-2.0
keywords ai llm mcp model-context-protocol router tools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img width="1157" height="365" alt="image" src="https://github.com/user-attachments/assets/d1db7ed7-1bc5-4d49-a858-c10be6003347" />
</div>

[![Documentation](https://img.shields.io/badge/Documentation-📖-green)](https://www.klavis.ai/docs)
[![Website](https://img.shields.io/badge/Website-🌐-purple)](https://www.klavis.ai)
[![Discord](https://img.shields.io/badge/Discord-Join-7289DA?logo=discord&logoColor=white)](https://discord.gg/p7TuTEcssn)

# Overview

**Strata** is a unified MCP server that intelligently manages any tool across one or multiple applications, presenting them to AI agents progressively without overwhelming the model context.

> [!TIP]
> **🚀 Looking for production-ready solution?** We offer a **fully managed Strata service** with enterprise-grade performance, access to more features and advanced AI model optimizations. [Get started instantly →](https://www.klavis.ai/)

**This repository contains our open-source implementation** - a streamlined version you can easily deploy as your MCP aggregation manager in your local infrastructure.

### 🚀 The Problem We Solve

Imagine you have:
- 📦 Dozens of MCP servers, each with dozens of tools
- 🤖 AI models seeing 100s-1000s of tools at once
- 📉 Degraded performance due to massive context

### ✨ The Strata Solution

Instead of flooding your AI model with hundreds of tools, Strata acts as an intelligent router:

🔍 **Smart Discovery** → Only exposes a few essential tools to the model  
🎯 **Progressive Access** → Finds and surfaces the right tool when needed  
⚡ **Optimized Context** → Maintains peak model performance  
🔗 **Seamless Integration** → Works with your existing MCP servers, and easy configuration  

# Quick Start

## Installation

```bash
pipx install strata-mcp
```

Or with pip:
```bash
pip install strata-mcp
```

For development:
```bash
pip install -e .
```

## Configure MCP Servers

You can configure your MCP servers by strata CLI tool. Or manually configure it in a JSON file, just like your other MCP JSON config files.

### Add MCP servers

- Stdio Server
```bash
strata add --type stdio <server_name> npx @playwright/mcp@latest
```

- SSE Server
```bash
strata add --type sse <server_name> http://localhost:8080/mcp/ --env API_KEY=your_key
```

- HTTP Server
```bash
strata add --type http <server_name> https://api.githubcopilot.com/mcp/ --header "Authorization=Bearer token"
```
- HTTP Server with OAuth
```bash
strata add --type http <server_name> https://mcp.notion.com/mcp --auth_type oauth
```


### List Servers
```bash
strata list
```

### Enable/Disable Servers
```bash
strata enable <server_name>
strata disable <server_name>
```

### Remove Servers
```bash
strata remove server-name
```

### Manual Configuration

Configuration is stored in `~/.config/strata/servers.json` by default. You can specify a custom config path:

```bash
strata --config-path /path/to/config.json add --type stdio ...
```

#### Config Format

```json
{
  "mcp": {
    "servers": {
      "github": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-github"],
        "env": {
          "GITHUB_TOKEN": "your_token"
        },
        "enabled": true
      },
      "api-server": {
        "type": "http",
        "url": "https://api.example.com/mcp",
        "headers": {
          "Authorization": "Bearer token"
        },
        "enabled": true
      }
    }
  }
}
```

#### Environment Variables

- `MCP_CONFIG_PATH` - Custom config file path
- `MCP_ROUTER_PORT` - Default port for HTTP/SSE server (default: 8080)

## Running Strata MCP servers

Strata itself is a MCP server. You can run and use it like a normal MCP, in stdio mode or http/sse mode.

### Stdio Mode (Default)
Run without arguments to start in stdio mode for direct MCP communication:
```bash
python -m strata
# or
strata
```

### HTTP/SSE Server Mode
Run with port to start as HTTP/SSE server:
```bash
strata run --port 8080
```

## Tool Integration

Strata can automatically configure itself in various AI assistants and IDEs that support MCP.

#### Add Strata to Claude Code
```bash
# Add to user configuration (default)
strata tool add claude

# Add to project-specific configuration
strata tool add claude --scope project
```

#### Add Strata to Gemini
```bash
strata tool add gemini
```

#### Add Strata to VSCode
```bash
strata tool add vscode
```

#### Add Strata to Cursor
```bash
# Add to user configuration (~/.cursor/mcp.json)
strata tool add cursor --scope user

# Add to project configuration (.cursor/mcp.json)
strata tool add cursor --scope project
```

**Supported scopes:**
- `user`: Global configuration (default)
- `project`: Project-specific configuration
- `local`: Same as project (for Cursor)

Note: VSCode doesn't support scope parameter and will use its default behavior.

## Available Tools

When running as a router, the following tools are exposed:

- `discover_server_actions` - Discover available actions from configured servers
- `get_action_details` - Get detailed information about a specific action
- `execute_action` - Execute an action on a target server
- `search_documentation` - Search server documentation
- `handle_auth_failure` - Handle authentication issues

# Development

### Running Tests
```bash
pytest
```

### Project Structure
- `src/strata/` - Main source code
  - `cli.py` - Command-line interface
  - `server.py` - Server implementation (stdio/HTTP/SSE)
  - `tools.py` - Tool implementations
  - `mcp_client_manager.py` - MCP client management
  - `config.py` - Configuration management

## Examples

### Running GitHub MCP Server through Router
```bash
# Add GitHub server (official HTTP server)
strata add --type http github https://api.githubcopilot.com/mcp/

# Run router in stdio mode
strata

# Or run as HTTP server
strata run --port 8080
```

### Running Multiple Servers
```bash
# Add multiple servers
strata add --type stdio playwright npx @playwright/mcp@latest
strata add --type http github https://api.githubcopilot.com/mcp/

# List all servers
strata list

# Run router with all enabled servers
strata run --port 8080
```

---

👉 **[Get Instant Access at Klavis AI (YC X25)](https://klavis.ai/)** 👈


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "strata-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "ai, llm, mcp, model-context-protocol, router, tools",
    "author": null,
    "author_email": "Klavis AI <connect@klavis.ai>",
    "download_url": "https://files.pythonhosted.org/packages/12/3c/dc931d773735959de0595be04d7ad4f4b5df347f7557ca6e506a9b993fcf/strata_mcp-1.0.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img width=\"1157\" height=\"365\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d1db7ed7-1bc5-4d49-a858-c10be6003347\" />\n</div>\n\n[![Documentation](https://img.shields.io/badge/Documentation-\ud83d\udcd6-green)](https://www.klavis.ai/docs)\n[![Website](https://img.shields.io/badge/Website-\ud83c\udf10-purple)](https://www.klavis.ai)\n[![Discord](https://img.shields.io/badge/Discord-Join-7289DA?logo=discord&logoColor=white)](https://discord.gg/p7TuTEcssn)\n\n# Overview\n\n**Strata** is a unified MCP server that intelligently manages any tool across one or multiple applications, presenting them to AI agents progressively without overwhelming the model context.\n\n> [!TIP]\n> **\ud83d\ude80 Looking for production-ready solution?** We offer a **fully managed Strata service** with enterprise-grade performance, access to more features and advanced AI model optimizations. [Get started instantly \u2192](https://www.klavis.ai/)\n\n**This repository contains our open-source implementation** - a streamlined version you can easily deploy as your MCP aggregation manager in your local infrastructure.\n\n### \ud83d\ude80 The Problem We Solve\n\nImagine you have:\n- \ud83d\udce6 Dozens of MCP servers, each with dozens of tools\n- \ud83e\udd16 AI models seeing 100s-1000s of tools at once\n- \ud83d\udcc9 Degraded performance due to massive context\n\n### \u2728 The Strata Solution\n\nInstead of flooding your AI model with hundreds of tools, Strata acts as an intelligent router:\n\n\ud83d\udd0d **Smart Discovery** \u2192 Only exposes a few essential tools to the model  \n\ud83c\udfaf **Progressive Access** \u2192 Finds and surfaces the right tool when needed  \n\u26a1 **Optimized Context** \u2192 Maintains peak model performance  \n\ud83d\udd17 **Seamless Integration** \u2192 Works with your existing MCP servers, and easy configuration  \n\n# Quick Start\n\n## Installation\n\n```bash\npipx install strata-mcp\n```\n\nOr with pip:\n```bash\npip install strata-mcp\n```\n\nFor development:\n```bash\npip install -e .\n```\n\n## Configure MCP Servers\n\nYou can configure your MCP servers by strata CLI tool. Or manually configure it in a JSON file, just like your other MCP JSON config files.\n\n### Add MCP servers\n\n- Stdio Server\n```bash\nstrata add --type stdio <server_name> npx @playwright/mcp@latest\n```\n\n- SSE Server\n```bash\nstrata add --type sse <server_name> http://localhost:8080/mcp/ --env API_KEY=your_key\n```\n\n- HTTP Server\n```bash\nstrata add --type http <server_name> https://api.githubcopilot.com/mcp/ --header \"Authorization=Bearer token\"\n```\n- HTTP Server with OAuth\n```bash\nstrata add --type http <server_name> https://mcp.notion.com/mcp --auth_type oauth\n```\n\n\n### List Servers\n```bash\nstrata list\n```\n\n### Enable/Disable Servers\n```bash\nstrata enable <server_name>\nstrata disable <server_name>\n```\n\n### Remove Servers\n```bash\nstrata remove server-name\n```\n\n### Manual Configuration\n\nConfiguration is stored in `~/.config/strata/servers.json` by default. You can specify a custom config path:\n\n```bash\nstrata --config-path /path/to/config.json add --type stdio ...\n```\n\n#### Config Format\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"github\": {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@modelcontextprotocol/server-github\"],\n        \"env\": {\n          \"GITHUB_TOKEN\": \"your_token\"\n        },\n        \"enabled\": true\n      },\n      \"api-server\": {\n        \"type\": \"http\",\n        \"url\": \"https://api.example.com/mcp\",\n        \"headers\": {\n          \"Authorization\": \"Bearer token\"\n        },\n        \"enabled\": true\n      }\n    }\n  }\n}\n```\n\n#### Environment Variables\n\n- `MCP_CONFIG_PATH` - Custom config file path\n- `MCP_ROUTER_PORT` - Default port for HTTP/SSE server (default: 8080)\n\n## Running Strata MCP servers\n\nStrata itself is a MCP server. You can run and use it like a normal MCP, in stdio mode or http/sse mode.\n\n### Stdio Mode (Default)\nRun without arguments to start in stdio mode for direct MCP communication:\n```bash\npython -m strata\n# or\nstrata\n```\n\n### HTTP/SSE Server Mode\nRun with port to start as HTTP/SSE server:\n```bash\nstrata run --port 8080\n```\n\n## Tool Integration\n\nStrata can automatically configure itself in various AI assistants and IDEs that support MCP.\n\n#### Add Strata to Claude Code\n```bash\n# Add to user configuration (default)\nstrata tool add claude\n\n# Add to project-specific configuration\nstrata tool add claude --scope project\n```\n\n#### Add Strata to Gemini\n```bash\nstrata tool add gemini\n```\n\n#### Add Strata to VSCode\n```bash\nstrata tool add vscode\n```\n\n#### Add Strata to Cursor\n```bash\n# Add to user configuration (~/.cursor/mcp.json)\nstrata tool add cursor --scope user\n\n# Add to project configuration (.cursor/mcp.json)\nstrata tool add cursor --scope project\n```\n\n**Supported scopes:**\n- `user`: Global configuration (default)\n- `project`: Project-specific configuration\n- `local`: Same as project (for Cursor)\n\nNote: VSCode doesn't support scope parameter and will use its default behavior.\n\n## Available Tools\n\nWhen running as a router, the following tools are exposed:\n\n- `discover_server_actions` - Discover available actions from configured servers\n- `get_action_details` - Get detailed information about a specific action\n- `execute_action` - Execute an action on a target server\n- `search_documentation` - Search server documentation\n- `handle_auth_failure` - Handle authentication issues\n\n# Development\n\n### Running Tests\n```bash\npytest\n```\n\n### Project Structure\n- `src/strata/` - Main source code\n  - `cli.py` - Command-line interface\n  - `server.py` - Server implementation (stdio/HTTP/SSE)\n  - `tools.py` - Tool implementations\n  - `mcp_client_manager.py` - MCP client management\n  - `config.py` - Configuration management\n\n## Examples\n\n### Running GitHub MCP Server through Router\n```bash\n# Add GitHub server (official HTTP server)\nstrata add --type http github https://api.githubcopilot.com/mcp/\n\n# Run router in stdio mode\nstrata\n\n# Or run as HTTP server\nstrata run --port 8080\n```\n\n### Running Multiple Servers\n```bash\n# Add multiple servers\nstrata add --type stdio playwright npx @playwright/mcp@latest\nstrata add --type http github https://api.githubcopilot.com/mcp/\n\n# List all servers\nstrata list\n\n# Run router with all enabled servers\nstrata run --port 8080\n```\n\n---\n\n\ud83d\udc49 **[Get Instant Access at Klavis AI (YC X25)](https://klavis.ai/)** \ud83d\udc48\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": null,
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://www.klavis.ai/",
        "Issues": "https://github.com/Klavis-AI/klavis/issues",
        "Repository": "https://github.com/Klavis-AI/klavis.git"
    },
    "split_keywords": [
        "ai",
        " llm",
        " mcp",
        " model-context-protocol",
        " router",
        " tools"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0c28ccda14a12bbf8091039aa069a111d08f74fb8fedbac47f77080e9a2a8d7f",
                "md5": "95c084a752dad1467f08ddef93273ba9",
                "sha256": "2cebb3fe291639b8af86ef8e9754b8d883967aeff8555ebd12c45edaed46fb67"
            },
            "downloads": -1,
            "filename": "strata_mcp-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "95c084a752dad1467f08ddef93273ba9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 43277,
            "upload_time": "2025-10-28T01:50:28",
            "upload_time_iso_8601": "2025-10-28T01:50:28.460881Z",
            "url": "https://files.pythonhosted.org/packages/0c/28/ccda14a12bbf8091039aa069a111d08f74fb8fedbac47f77080e9a2a8d7f/strata_mcp-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "123cdc931d773735959de0595be04d7ad4f4b5df347f7557ca6e506a9b993fcf",
                "md5": "e454c21446ffd6b7c996e09d35433c15",
                "sha256": "8631c09dbf6e65d33a7597aef86c01d35dfd0296e8af78f0f04d0bba44afc017"
            },
            "downloads": -1,
            "filename": "strata_mcp-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e454c21446ffd6b7c996e09d35433c15",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 114290,
            "upload_time": "2025-10-28T01:50:30",
            "upload_time_iso_8601": "2025-10-28T01:50:30.415053Z",
            "url": "https://files.pythonhosted.org/packages/12/3c/dc931d773735959de0595be04d7ad4f4b5df347f7557ca6e506a9b993fcf/strata_mcp-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-28 01:50:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Klavis-AI",
    "github_project": "klavis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "strata-mcp"
}
        
Elapsed time: 1.25420s