๐ Kodus MCP Manager
February 10, 2026 ยท View on GitHub
๐ Multi-Cloud Platform Manager - A robust system for managing MCP integrations with providers like Composio.
๐ Table of Contents
- ๐๏ธ Prerequisites
- ๐ Providers
- โ๏ธ Configuration
- ๐ Installation
- ๐ฅ Running the Application
- ๐ Self-Hosted
- ๐ Adding a New Provider
- ๐งช Testing
- ๐ซ Postman
- ๐ OpenAPI / Swagger
- ๐ Troubleshooting
๐๏ธ Prerequisites
| Tool | Minimum Version | Status | Description |
|---|---|---|---|
| ๐ Node.js | v22.22.0 | โ Required | JavaScript runtime |
| ๐ณ Docker | Latest | โ Required | For PostgreSQL |
| ๐ณ Docker Compose | Latest | โ Required | Container orchestration |
| ๐ Composio API Key | - | โ Required | For Composio integration |
๐ Providers
๐ Available Providers
| Provider | Status | Description | Documentation |
|---|---|---|---|
| ๐ฏ Composio | โ Active | Automation and integration platform | Docs |
| ๐ข Kodus | โ Active | Kodus-managed MCPs (Kodus MCP, Context7 MCP & Kodus Docs MCP) | - |
| โ New Provider | ๐ In Development | Add your own provider | Guide |
๐ง Composio Setup
To use the Composio provider, you need to:
- ๐ Create an integration for any app on the Composio platform
- ๐ฅ๏ธ Set up an MCP Server for this integration
- ๐ 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:
| Column | Type | Description |
|---|---|---|
id | UUID | Primary key (uuid_generate_v4) |
organizationId | VARCHAR | Organization ID |
integrationId | VARCHAR | Integration ID |
provider | VARCHAR | Provider name (e.g., composio) |
status | VARCHAR | Connection status |
appName | VARCHAR | Application name |
mcpUrl | VARCHAR | MCP server URL |
allowedTools | JSONB | List of allowed tools |
metadata | JSONB | Additional connection data |
createdAt | TIMESTAMP | Creation date |
updatedAt | TIMESTAMP | Last update date |
deletedAt | TIMESTAMP | Deletion date (soft delete) |
๐ migrations
TypeORM migration control table:
| Column | Type | Description |
|---|---|---|
id | SERIAL | Primary key |
timestamp | BIGINT | Migration timestamp |
name | VARCHAR | Migration 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
| Command | Description |
|---|---|
yarn migrate | Run complete migrations (schema + tables) |
yarn pre:migrate | Create schema if it doesn't exist |
yarn migration:run | Run TypeORM migrations |
yarn migration:generate | Generate new migration |
yarn start:dev | Start application in development mode |
yarn docker:up | Start Docker containers |
yarn docker:down | Stop 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:
- Copy
.env.exampleto.envand configure it. - Important: Set
NODE_ENVto control the environment (e.g.,production,development). - Run
docker compose up -d.
- Copy
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
- Open Postman
- Import โ File
- Select:
postman/kodus-mcp-manager.postman_collection.json
๐ง Configure Variables
| Variable | Value | Description |
|---|---|---|
baseUrl | http://localhost:3000 | API base URL |
provider | composio | Default provider |
token | your-jwt-token | Authentication 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
| Resource | Link | Description |
|---|---|---|
| ๐ NestJS Documentation | nestjs.com | Base framework |
| ๐ฏ Composio Docs | docs.composio.dev | Main provider |
| ๐ณ Docker Docs | docs.docker.com | Containerization |
| ๐ซ Postman | postman.com | API testing |
๐ค Contributing
- Fork the project
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
๐ License
This project is under the MIT license. See the LICENSE file for more details.