Setting Up MCP Server

Complete guide to setting up an AIDP MCP (Model Context Protocol) server.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. AIDP provides native MCP support for seamless integration with AI platforms like Claude, ChatGPT, and others.


Prerequisites


Installation

Option 1: Using npm (Node.js)

npm install -g @aidp/mcp-server

Option 2: Using pip (Python)

Option 3: Using Docker


Quick Start

1. Initialize Configuration

Create a configuration file:

This creates mcp-config.yml:

2. Set Environment Variables

Or create a .env file:

3. Start the Server

Or with custom config:

Expected Output:


Configuration Options

Server Configuration

AIDP Configuration

Tool Configuration

Security Configuration


Docker Deployment

Using Docker Compose

Create docker-compose.yml:

Start the server:


Verification

1. Check Server Health

Expected Response:

2. List Available Tools

Expected Response:

3. Test a Tool


Production Deployment

Using PM2 (Node.js)

Using systemd (Linux)

Create /etc/systemd/system/aidp-mcp.service:

Enable and start:


Monitoring

Logs

Metrics

Access metrics endpoint:

Response:


Troubleshooting

Server Won't Start

Issue: Error: AIDP API key not found

Solution:

Connection Refused

Issue: ECONNREFUSED when calling tools

Solution: Check if server is running:

CORS Errors

Issue: Browser shows CORS errors

Solution: Add your domain to CORS origins:


Next Steps


Support

Last updated