mcp-composer


Namemcp-composer JSON
Version 0.1.0.7 PyPI version JSON
download
home_pageNone
SummaryFastMCP-based MCP Server Orchestrator
upload_time2025-08-29 15:23:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords agent ibm llm mcp mcp client mcp developer kit mcp server model context protocol
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastMCP-based MCP Server Orchestrator

The MCP Composer is a [FastMCP](https://github.com/jlowin/fastmcp) based Composer that manages multiple MCP servers and tools.
Servers and tools can be registered at runtime using structured JSON configurations.
The MCP Composer serves as an orchestrator for tool execution and forwards tool requests to the correct upstream MCP server or interface.

The MCP Composer supports multiple tool types, such as OpenAPI (REST), GraphQL, CLI-based tools, client SDKs, and nested MCP servers.

It also manages multiple MCP servers and tools with dynamic registration, authentication, and unified interface.

## Features

### Core Capabilities
- **Multi-Server Orchestration**: Manage and coordinate multiple MCP servers simultaneously
- **Dynamic Configuration**: Register servers and tools at runtime using JSON configurations
- **Multiple Transport Modes**: Support for stdio, HTTP, and Server-Sent Events (SSE)
- **Authentication Support**: OAuth integration and dynamic token management
- **Middleware System**: Extensible middleware framework for request/response processing
- **Tool Management**: Support for OpenAPI, GraphQL, CLI tools, and custom implementations
- **Environment Management**: Flexible environment variable handling and inheritance

### Transport Modes
- **stdio**: Direct process communication (default)
- **HTTP**: RESTful API endpoints
- **SSE**: Server-Sent Events for real-time communication

### Middleware Management
- **Validation**: Validate middleware configuration files
- **Listing**: List configured middlewares with filtering options
- **Dynamic Addition**: Add or update middlewares at runtime
- **Import Verification**: Ensure middleware classes can be imported
- **Priority Control**: Execution order management
- **Hook Filtering**: Selective middleware application

## Installation

1. Install using pipx 

    ```
    pipx install mcp-composer
    ```

2. Install using uvx 

    ```
    uvx pip install mcp-composer  

    ## To verify run the following command 
    
    uvx pip show mcp-composer 
    ```

3. Add as dependency to project 

    ```
    uv add mcp-composer
    ```

## Usage

MCOP composer itself act as mcp server and can be started at any of the available tarnsport

```bash
# Run with STDIO transport (default)
mcp-composer --mode stdio

# Run with HTTP mode
mcp-composer --mode http --endpoint http://api.example.com --id http-server

# Set custom host and port for HTTP/SSE modes
mcp-composer --mode http --host 127.0.0.1 --port 8080 --endpoint http://api.example.com

# Run with SSE mode
mcp-composer --mode sse --endpoint http://localhost:8001/sse --id sse-server

# Run SSE server as STDIO
mcp-composer --mode stdio --sse-url http://localhost:8001/sse 
```

### Server Configuration

A MCP composer instance can mount different type of mcp server with different authentication mechanism

```bash
# Use custom configuration file
mcp-composer --mode http --endpoint http://localhost:8001/mcp --config_path /path/to/servers.json 
```

A servers.json file can have different type of mcp server 

```
[
  {
    "id": "mcp-countries",
    "type": "graphql",
    "graphql": {
      "endpoint": "https://countries.trevorblades.com/",
      "schema_filepath": "<path to your graphql schema file>/countries.graphql"
    }
  },
  {
    "id": "mcp-pokemon",
    "type": "graphql",
    "graphql": {
      "endpoint": "https://graphqlpokemon.favware.tech/v8",
      "schema_filepath": "<path to your graphql schema file>/pokemon.graphql"
    }
  },
  {
    "id": "sse-server",
    "type": "sse",
    "endpoint": "http://localhost:8001/sse",
  },
  {
    "id": "http-server",
    "type": "http",
    "endpoint": "http://localhost:8002/http",
  },
  {
    "id": "mcp-xxx",
    "type": "openapi",
    "open_api": {
      "endpoint": "<api server endpoint>",
      "spec_filepath": "<path to your openapi spec file>",
      "custom_routes": [
        {
          "methods":["GET"],
          "pattern":".*/users/.*",
          "mcp_type":"RESOURCE_TEMPLATE"
        },
        {
          "methods":["GET"],
          "pattern":".*/events/.*",
          "mcp_type":"TOOL"
        },
        {
          "methods":["POST"],
          "pattern":".*/",
          "mcp_type":"EXCLUDE"
        }
      ]
    },
    "auth_strategy":"bearer",
    "auth":{
      "token":"<your api key>"
    }
   
   }
]
```


### Authentication

```bash
# Enable OAuth authentication
mcp-composer --auth_type oauth --mode http --endpoint http://api.example.com 
```

### Environment Management

```bash
# Set specific environment variables
mcp-composer --env API_KEY mykey --env DEBUG true --mode http --endpoint http://api.example.com 
```

### Composer Tools Control

By default, MCP Composer acts as an MCP management system and exposes the following built-in tools:

#### Server Management Tools
- **register_mcp_server**: Register a new MCP server
- **update_mcp_server_config**: Update existing server configuration
- **delete_mcp_server**: Remove a server from the composer
- **member_health**: Check health status of member servers
- **activate_mcp_server**: Activate a previously deactivated server
- **deactivate_mcp_server**: Deactivate a server temporarily
- **add_tools**: Add individual tools to the composer
- **add_tools_from_openapi**: Import tools from OpenAPI specifications
- **list_member_servers**: List all registered member servers

#### Tool Management Tools
- **get_tool_config_by_name**: Retrieve tool configuration by name of the tool
- **get_tool_config_by_server**: Get tool configuration for a specific server
- **disable_tools**: Disable specific tools
- **enable_tools**: Enable previously disabled tools
- **update_tool_description**: Update tool descriptions and metadata

#### Prompt Management Tools
- **add_prompts**: Add new prompts to the system
- **get_all_prompts**: Retrieve all available prompts
- **list_prompts_per_server**: List prompts for a specific server
- **filter_prompts**: Filter prompts based on criteria
- **disable_prompts**: Disable specific prompts
- **enable_prompts**: Enable previously disabled prompts

#### Resource Management Tools
- **create_resource**: Create new resources
- **create_resource_template**: Create resource templates
- **list_resources**: List all available resources
- **list_resource_templates**: List resource templates
- **list_resources_per_server**: List resources for a specific server
- **filter_resources**: Filter resources based on criteria
- **disable_resources**: Disable specific resources
- **enable_resources**: Enable previously disabled resources

These tools provide comprehensive management capabilities for the MCP Composer ecosystem.


In order to disable the admisnitrative tools start mcp-composer with following tools

```bash
# Disable built-in composer tools
mcp-composer --disable-composer-tools --mode stdio
```
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mcp-composer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "agent, ibm, llm, mcp, mcp client, mcp developer kit, mcp server, model context protocol",
    "author": null,
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "# FastMCP-based MCP Server Orchestrator\n\nThe MCP Composer is a [FastMCP](https://github.com/jlowin/fastmcp) based Composer that manages multiple MCP servers and tools.\nServers and tools can be registered at runtime using structured JSON configurations.\nThe MCP Composer serves as an orchestrator for tool execution and forwards tool requests to the correct upstream MCP server or interface.\n\nThe MCP Composer supports multiple tool types, such as OpenAPI (REST), GraphQL, CLI-based tools, client SDKs, and nested MCP servers.\n\nIt also manages multiple MCP servers and tools with dynamic registration, authentication, and unified interface.\n\n## Features\n\n### Core Capabilities\n- **Multi-Server Orchestration**: Manage and coordinate multiple MCP servers simultaneously\n- **Dynamic Configuration**: Register servers and tools at runtime using JSON configurations\n- **Multiple Transport Modes**: Support for stdio, HTTP, and Server-Sent Events (SSE)\n- **Authentication Support**: OAuth integration and dynamic token management\n- **Middleware System**: Extensible middleware framework for request/response processing\n- **Tool Management**: Support for OpenAPI, GraphQL, CLI tools, and custom implementations\n- **Environment Management**: Flexible environment variable handling and inheritance\n\n### Transport Modes\n- **stdio**: Direct process communication (default)\n- **HTTP**: RESTful API endpoints\n- **SSE**: Server-Sent Events for real-time communication\n\n### Middleware Management\n- **Validation**: Validate middleware configuration files\n- **Listing**: List configured middlewares with filtering options\n- **Dynamic Addition**: Add or update middlewares at runtime\n- **Import Verification**: Ensure middleware classes can be imported\n- **Priority Control**: Execution order management\n- **Hook Filtering**: Selective middleware application\n\n## Installation\n\n1. Install using pipx \n\n    ```\n    pipx install mcp-composer\n    ```\n\n2. Install using uvx \n\n    ```\n    uvx pip install mcp-composer  \n\n    ## To verify run the following command \n    \n    uvx pip show mcp-composer \n    ```\n\n3. Add as dependency to project \n\n    ```\n    uv add mcp-composer\n    ```\n\n## Usage\n\nMCOP composer itself act as mcp server and can be started at any of the available tarnsport\n\n```bash\n# Run with STDIO transport (default)\nmcp-composer --mode stdio\n\n# Run with HTTP mode\nmcp-composer --mode http --endpoint http://api.example.com --id http-server\n\n# Set custom host and port for HTTP/SSE modes\nmcp-composer --mode http --host 127.0.0.1 --port 8080 --endpoint http://api.example.com\n\n# Run with SSE mode\nmcp-composer --mode sse --endpoint http://localhost:8001/sse --id sse-server\n\n# Run SSE server as STDIO\nmcp-composer --mode stdio --sse-url http://localhost:8001/sse \n```\n\n### Server Configuration\n\nA MCP composer instance can mount different type of mcp server with different authentication mechanism\n\n```bash\n# Use custom configuration file\nmcp-composer --mode http --endpoint http://localhost:8001/mcp --config_path /path/to/servers.json \n```\n\nA servers.json file can have different type of mcp server \n\n```\n[\n  {\n    \"id\": \"mcp-countries\",\n    \"type\": \"graphql\",\n    \"graphql\": {\n      \"endpoint\": \"https://countries.trevorblades.com/\",\n      \"schema_filepath\": \"<path to your graphql schema file>/countries.graphql\"\n    }\n  },\n  {\n    \"id\": \"mcp-pokemon\",\n    \"type\": \"graphql\",\n    \"graphql\": {\n      \"endpoint\": \"https://graphqlpokemon.favware.tech/v8\",\n      \"schema_filepath\": \"<path to your graphql schema file>/pokemon.graphql\"\n    }\n  },\n  {\n    \"id\": \"sse-server\",\n    \"type\": \"sse\",\n    \"endpoint\": \"http://localhost:8001/sse\",\n  },\n  {\n    \"id\": \"http-server\",\n    \"type\": \"http\",\n    \"endpoint\": \"http://localhost:8002/http\",\n  },\n  {\n    \"id\": \"mcp-xxx\",\n    \"type\": \"openapi\",\n    \"open_api\": {\n      \"endpoint\": \"<api server endpoint>\",\n      \"spec_filepath\": \"<path to your openapi spec file>\",\n      \"custom_routes\": [\n        {\n          \"methods\":[\"GET\"],\n          \"pattern\":\".*/users/.*\",\n          \"mcp_type\":\"RESOURCE_TEMPLATE\"\n        },\n        {\n          \"methods\":[\"GET\"],\n          \"pattern\":\".*/events/.*\",\n          \"mcp_type\":\"TOOL\"\n        },\n        {\n          \"methods\":[\"POST\"],\n          \"pattern\":\".*/\",\n          \"mcp_type\":\"EXCLUDE\"\n        }\n      ]\n    },\n    \"auth_strategy\":\"bearer\",\n    \"auth\":{\n      \"token\":\"<your api key>\"\n    }\n   \n   }\n]\n```\n\n\n### Authentication\n\n```bash\n# Enable OAuth authentication\nmcp-composer --auth_type oauth --mode http --endpoint http://api.example.com \n```\n\n### Environment Management\n\n```bash\n# Set specific environment variables\nmcp-composer --env API_KEY mykey --env DEBUG true --mode http --endpoint http://api.example.com \n```\n\n### Composer Tools Control\n\nBy default, MCP Composer acts as an MCP management system and exposes the following built-in tools:\n\n#### Server Management Tools\n- **register_mcp_server**: Register a new MCP server\n- **update_mcp_server_config**: Update existing server configuration\n- **delete_mcp_server**: Remove a server from the composer\n- **member_health**: Check health status of member servers\n- **activate_mcp_server**: Activate a previously deactivated server\n- **deactivate_mcp_server**: Deactivate a server temporarily\n- **add_tools**: Add individual tools to the composer\n- **add_tools_from_openapi**: Import tools from OpenAPI specifications\n- **list_member_servers**: List all registered member servers\n\n#### Tool Management Tools\n- **get_tool_config_by_name**: Retrieve tool configuration by name of the tool\n- **get_tool_config_by_server**: Get tool configuration for a specific server\n- **disable_tools**: Disable specific tools\n- **enable_tools**: Enable previously disabled tools\n- **update_tool_description**: Update tool descriptions and metadata\n\n#### Prompt Management Tools\n- **add_prompts**: Add new prompts to the system\n- **get_all_prompts**: Retrieve all available prompts\n- **list_prompts_per_server**: List prompts for a specific server\n- **filter_prompts**: Filter prompts based on criteria\n- **disable_prompts**: Disable specific prompts\n- **enable_prompts**: Enable previously disabled prompts\n\n#### Resource Management Tools\n- **create_resource**: Create new resources\n- **create_resource_template**: Create resource templates\n- **list_resources**: List all available resources\n- **list_resource_templates**: List resource templates\n- **list_resources_per_server**: List resources for a specific server\n- **filter_resources**: Filter resources based on criteria\n- **disable_resources**: Disable specific resources\n- **enable_resources**: Enable previously disabled resources\n\nThese tools provide comprehensive management capabilities for the MCP Composer ecosystem.\n\n\nIn order to disable the admisnitrative tools start mcp-composer with following tools\n\n```bash\n# Disable built-in composer tools\nmcp-composer --disable-composer-tools --mode stdio\n```",
    "bugtrack_url": null,
    "license": null,
    "summary": "FastMCP-based MCP Server Orchestrator",
    "version": "0.1.0.7",
    "project_urls": null,
    "split_keywords": [
        "agent",
        " ibm",
        " llm",
        " mcp",
        " mcp client",
        " mcp developer kit",
        " mcp server",
        " model context protocol"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "084b3854a67a508d8ebf15d83852279f9ebf9757e76b5225470e559671a35c89",
                "md5": "c20cfe95fceeff6664b33de271b8bce4",
                "sha256": "d8bafc8ded33eade6733879d2b3a691c73a483f541d9d9f83a4bb5d85c758385"
            },
            "downloads": -1,
            "filename": "mcp_composer-0.1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c20cfe95fceeff6664b33de271b8bce4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 146871,
            "upload_time": "2025-08-29T15:23:50",
            "upload_time_iso_8601": "2025-08-29T15:23:50.866197Z",
            "url": "https://files.pythonhosted.org/packages/08/4b/3854a67a508d8ebf15d83852279f9ebf9757e76b5225470e559671a35c89/mcp_composer-0.1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 15:23:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mcp-composer"
}
        
Elapsed time: 1.51012s