π Multi-Cloud Platform Manager - A robust system for managing MCP integrations with providers like Composio.
- ποΈ Prerequisites
- π Providers
- βοΈ Configuration
- π Installation
- π₯ Running the Application
- π Adding a New Provider
- π§ͺ Testing
- π« Postman
- π Troubleshooting
Tool | Minimum Version | Status | Description |
---|---|---|---|
π Node.js | v18+ | β Required | JavaScript runtime |
π³ Docker | Latest | β Required | For PostgreSQL |
π³ Docker Compose | Latest | β Required | Container orchestration |
π Composio API Key | - | β Required | For Composio integration |
Provider | Status | Description | Documentation |
---|---|---|---|
π― Composio | β Active | Automation and integration platform | Docs |
β New Provider | π In Development | Add your own provider | Guide |
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
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
The project uses a dedicated schema to organize all application tables:
-- Main schema
CREATE SCHEMA IF NOT EXISTS "mcp-manager";
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) |
TypeORM migration control table:
Column | Type | Description |
---|---|---|
id |
SERIAL | Primary key |
timestamp |
BIGINT | Migration timestamp |
name |
VARCHAR | Migration name |
# 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;"
git clone https://github.com/kodustech/kodus-mcp-manager.git
cd kodus-mcp-manager
yarn install
# π³ Start PostgreSQL database
docker-compose up -d
# π Check if database is running
docker-compose ps
# π 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 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
# ποΈ Build the application
yarn build
# π Run in production
yarn start:prod
# π 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
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 |
# Add to .env file
MCP_PROVIDERS=composio,new_provider
// 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
}
// src/clients/new_provider/index.ts
export class NewProviderClient {
constructor(private config: any) {}
async makeApiCall() {
// External API calls
}
}
// test/provider/new_provider.spec.ts
describe('NewProviderProvider', () => {
// Your tests here
});
# π§ͺ Run all tests
yarn test
π View complete testing documentation
- Open Postman
- Import β File
- Select:
postman/kodus-mcp-manager.postman_collection.json
Variable | Value | Description |
---|---|---|
baseUrl |
http://localhost:3000 |
API base URL |
provider |
composio |
Default provider |
token |
your-jwt-token |
Authentication token |
- π 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
The system now supports dynamic tool selection and management:
GET /mcp/{provider}/integrations/{integrationId}/available-tools
Returns all available tools for a specific integration.
GET /mcp/{provider}/integrations/{integrationId}/selected-tools
Returns currently selected tools for an integration.
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.
The system supports creating integrations directly in the database:
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
π΄ "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
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 |
- 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
This project is under the MIT license. See the LICENSE file for more details.