๐Ÿš€ Kodus MCP Manager

February 10, 2026 ยท View on GitHub

Node.js TypeScript NestJS PostgreSQL Docker License

๐Ÿ”Œ Multi-Cloud Platform Manager - A robust system for managing MCP integrations with providers like Composio.


๐Ÿ“‹ Table of Contents


๐Ÿ—๏ธ Prerequisites

ToolMinimum VersionStatusDescription
๐Ÿ“Ÿ Node.jsv22.22.0โœ… RequiredJavaScript runtime
๐Ÿณ DockerLatestโœ… RequiredFor PostgreSQL
๐Ÿณ Docker ComposeLatestโœ… RequiredContainer orchestration
๐Ÿ”‘ Composio API Key-โœ… RequiredFor Composio integration

๐Ÿ”Œ Providers

๐Ÿ“Š Available Providers

ProviderStatusDescriptionDocumentation
๐ŸŽฏ Composioโœ… ActiveAutomation and integration platformDocs
๐Ÿข Kodusโœ… ActiveKodus-managed MCPs (Kodus MCP, Context7 MCP & Kodus Docs MCP)-
โž• New Provider๐Ÿ”„ In DevelopmentAdd your own providerGuide

๐Ÿ”ง Composio Setup

To use the Composio provider, you need to:

  1. ๐Ÿ”‘ Create an integration for any app on the Composio platform
  2. ๐Ÿ–ฅ๏ธ Set up an MCP Server for this integration
  3. ๐Ÿ“‹ Configure the required environment variables

โš™๏ธ Configuration

๐ŸŒ Environment Variables

In the .env.test file at the project root:

# ๐Ÿš€ Application
NODE_ENV=development
PORT=3000

# ๐Ÿ” JWT
JWT_SECRET=your-super-secret-jwt-key

# ๐Ÿ”Œ Providers
MCP_PROVIDERS=composio

# ๐ŸŽฏ Composio
COMPOSIO_API_KEY=your-composio-api-key
COMPOSIO_BASE_URL=https://backend.composio.dev

# ๐Ÿ—„๏ธ Database
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=kodus
DB_PASSWORD=kodus123
DB_DATABASE=kodus_mcp

# ๐Ÿ”— URLs
# Used as redirect after OAuth2 login
REDIRECT_URI=http://localhost:3000/callback

๐Ÿ—„๏ธ Database Structure

๐Ÿ“Š Schema: mcp-manager

The project uses a dedicated schema to organize all application tables:

-- Main schema
CREATE SCHEMA IF NOT EXISTS "mcp-manager";

๐Ÿ“‹ Tables

๐Ÿ”— mcp_connections

Main table for storing MCP connections:

ColumnTypeDescription
idUUIDPrimary key (uuid_generate_v4)
organizationIdVARCHAROrganization ID
integrationIdVARCHARIntegration ID
providerVARCHARProvider name (e.g., composio)
statusVARCHARConnection status
appNameVARCHARApplication name
mcpUrlVARCHARMCP server URL
allowedToolsJSONBList of allowed tools
metadataJSONBAdditional connection data
createdAtTIMESTAMPCreation date
updatedAtTIMESTAMPLast update date
deletedAtTIMESTAMPDeletion date (soft delete)

๐Ÿ“ migrations

TypeORM migration control table:

ColumnTypeDescription
idSERIALPrimary key
timestampBIGINTMigration timestamp
nameVARCHARMigration name

๐Ÿ”ง Useful Commands

# Check database structure
docker-compose exec kodus-mcp-manager psql -h db_postgres -U $API_PG_DB_USERNAME -d $API_PG_DB_DATABASE -c "\dt mcp-manager.*"

# Check connection data
docker-compose exec kodus-mcp-manager psql -h db_postgres -U $API_PG_DB_USERNAME -d $API_PG_DB_DATABASE -c "SELECT * FROM \"mcp-manager\".mcp_connections;"

# Check executed migrations
docker-compose exec kodus-mcp-manager psql -h db_postgres -U $API_PG_DB_USERNAME -d $API_PG_DB_DATABASE -c "SELECT * FROM \"mcp-manager\".migrations;"

๐Ÿš€ Installation

๐Ÿ“ฅ 1. Clone the Repository

git clone https://github.com/kodustech/kodus-mcp-manager.git
cd kodus-mcp-manager

๐Ÿ“ฆ 2. Install Dependencies

yarn install

๐Ÿ”ฅ Running the Application

๐Ÿ› ๏ธ Local Development

๐Ÿ“‹ Prerequisites

# ๐Ÿณ Start PostgreSQL database
docker-compose up -d

# ๐Ÿ“Š Check if database is running
docker-compose ps

๐Ÿ—„๏ธ Database Setup

# ๐Ÿ”„ Run migrations (creates schema and tables automatically)
yarn migrate

# Or run steps separately:
# 1. Create schema (if needed)
yarn pre:migrate

# 2. Run migrations
yarn migration:run

๐Ÿš€ Start Application

# ๐Ÿš€ Start in development mode
yarn start:dev

# Or use Docker
docker-compose exec kodus-mcp-manager yarn start:dev

The application will be available at: http://localhost:3101

๐Ÿญ Production

# ๐Ÿ—๏ธ Build the application
yarn build

# ๐Ÿš€ Run in production
yarn start:prod

๐Ÿณ Docker (Alternative)

# ๐Ÿš€ Start everything with Docker
docker-compose up -d

# ๐Ÿ“Š Check status
docker-compose ps

# ๐Ÿ”„ Run migrations in container
docker-compose exec kodus-mcp-manager yarn migrate

๐Ÿ“‹ Available Scripts

CommandDescription
yarn migrateRun complete migrations (schema + tables)
yarn pre:migrateCreate schema if it doesn't exist
yarn migration:runRun TypeORM migrations
yarn migration:generateGenerate new migration
yarn start:devStart application in development mode
yarn docker:upStart Docker containers
yarn docker:downStop Docker containers

๐Ÿš€ Self-Hosted

We provide a complete self-hosted deployment kit using Docker.

โฑ๏ธ TL;DR Summary

  • ๐Ÿ“‹ Requirements: Docker + Existing Postgres (or use the provided compose service).
  • โšก Steps:
    1. Copy .env.example to .env and configure it.
    2. Important: Set NODE_ENV to control the environment (e.g., production, development).
    3. Run docker compose up -d.

Check the Self-Hosted Guide for detailed instructions.


๐Ÿ†• Adding a New Provider

๐Ÿ“‹ Step by Step

1๏ธโƒฃ Configure Provider

# Add to .env file
MCP_PROVIDERS=composio,new_provider

2๏ธโƒฃ Create Provider Class

// src/modules/providers/new_provider/new_provider.provider.ts

import { BaseProvider } from '../base.provider';

export class NewProviderProvider extends BaseProvider {
    // ๐Ÿ”ง Provider implementation

    async getIntegrations() {
        // Your logic here
    }

    async initiateConnection() {
        // Your logic here
    }

    // ... other required methods
}

3๏ธโƒฃ Create Client (If Needed)

// src/clients/new_provider/index.ts

export class NewProviderClient {
    constructor(private config: any) {}

    async makeApiCall() {
        // External API calls
    }
}

4๏ธโƒฃ Create Tests

// test/provider/new_provider.spec.ts

describe('NewProviderProvider', () => {
    // Your tests here
});

๐Ÿงช Testing

# ๐Ÿงช Run all tests
yarn test

๐Ÿ“– View complete testing documentation


๐Ÿ“ซ Postman

๐Ÿ“ฅ Import Collection

  1. Open Postman
  2. Import โ†’ File
  3. Select: postman/kodus-mcp-manager.postman_collection.json

๐Ÿ”ง Configure Variables

VariableValueDescription
baseUrlhttp://localhost:3000API base URL
providercomposioDefault provider
tokenyour-jwt-tokenAuthentication token

๐ŸŽฏ Available Endpoints

  • ๐Ÿ”— Connections: List, search, update
  • ๐Ÿ”Œ Integrations: List, details, parameters, tools, create
  • ๐Ÿ› ๏ธ Tool Selection: Get available tools, get selected tools, update selected tools
  • ๐Ÿš€ Connect: Initiate connection with provider

๐Ÿ› ๏ธ Tool Selection

The system now supports dynamic tool selection and management:

Available Tools

GET /mcp/{provider}/integrations/{integrationId}/available-tools

Returns all available tools for a specific integration.

Selected Tools

GET /mcp/{provider}/integrations/{integrationId}/selected-tools

Returns currently selected tools for an integration.

Update Selected Tools

PUT /mcp/{provider}/integrations/{integrationId}/selected-tools
Content-Type: application/json

{
  "allowedTools": ["KODUS_LIST_REPOSITORIES", "KODUS_GET_KODY_RULES"]
}

Updates the selected tools for an integration.

๐Ÿ”Œ Integration Management

The system supports creating integrations directly in the database:

Create Integration

POST /mcp/integration/{provider}
Authorization: Bearer {token}
Content-Type: application/json

{
  "integrationId": "kd_mcp_oTUrzqsaxTg",
  "mcpUrl": "https://mcp.kodus.io"
}

Creates an integration for the organization with the specified provider. The integrationId is passed in the request body. If the integration already exists, returns the existing one. Allows custom configuration of MCP URL.

Example:

POST /mcp/integration/kodusmcp

๐Ÿ“š OpenAPI / Swagger

Swagger UI and OpenAPI JSON are exposed when API_DOCS_ENABLED=true.

๐Ÿ” Basic Auth (required)

Set the following environment variables:

API_DOCS_ENABLED=true
API_DOCS_PATH=/docs
API_DOCS_SPEC_PATH=/openapi.json
API_DOCS_BASIC_USER=dev
API_DOCS_BASIC_PASS=devpass
API_DOCS_SERVER_URLS=
API_DOCS_BASE_URL=

๐Ÿ“„ Endpoints

  • Swagger UI: /docs
  • OpenAPI JSON: /openapi.json

๐Ÿ“ฆ Export OpenAPI

OPENAPI_SOURCE_URL=http://localhost:3101/openapi.json \
OPENAPI_BASIC_AUTH=dev:devpass \
yarn openapi:export

โœ… Lint OpenAPI

yarn openapi:lint

๐Ÿ› Troubleshooting

โŒ Common Issues

๐Ÿ”ด "Port 3101 already in use"

# Find process on port 3101
lsof -i :3101

# Kill process
kill -9 <PID>

# Or use different port
PORT=3102 yarn start:dev

๐Ÿ”ด "Database connection failed"

# Check if PostgreSQL is running
docker-compose ps

# Restart database
docker-compose restart db_postgres

# Check logs
docker-compose logs db_postgres

๐Ÿ”ด "Migration failed - schema does not exist"

# Create schema manually
yarn pre:migrate

# Or run complete migrations
yarn migrate

๐Ÿ”ด "Migration failed - table already exists"

# Check executed migrations
docker-compose exec kodus-mcp-manager npm run typeorm -- migration:show

# Revert last migration if needed
yarn migration:revert

# Or reset database completely
docker-compose down -v
docker-compose up -d
yarn migrate

๐Ÿ”ด "Composio API Key invalid"

# Check environment variable
echo $COMPOSIO_API_KEY

# Test API key
curl -H "x-api-key: $COMPOSIO_API_KEY" https://backend.composio.dev/api/v1/auth_configs

๐Ÿ”ด "Script create-schema.sh failed"

# Check if database container is running
docker ps | grep db_postgres

# Check environment variables
cat .env | grep API_PG_DB

# Run script manually
./scripts/create-schema.sh

๐Ÿ“š Useful Resources

ResourceLinkDescription
๐Ÿ“– NestJS Documentationnestjs.comBase framework
๐ŸŽฏ Composio Docsdocs.composio.devMain provider
๐Ÿณ Docker Docsdocs.docker.comContainerization
๐Ÿ“ซ Postmanpostman.comAPI testing

๐Ÿค Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is under the MIT license. See the LICENSE file for more details.


๐ŸŽ‰ Kodus MCP Manager Project

[๐Ÿš€ Deploy](yarn start:prod) [๐Ÿงช Tests](yarn test) ๐Ÿ“ซ Postman

Made with โค๏ธ by the Kodus team