🔗 Internal API MCP Server

Enterprise API Integration

Custom MCP server for connecting to internal APIs, microservices, and enterprise application ecosystems.

API Integration Features

Comprehensive enterprise API connectivity and management

🔌 API Connectivity

  • REST and GraphQL API integration
  • Authentication handling (OAuth, API keys)
  • Rate limiting and retry mechanisms
  • Response caching and optimization

📋 API Discovery

  • OpenAPI/Swagger specification parsing
  • Endpoint documentation and examples
  • API versioning and compatibility
  • Service mesh integration

🛡️ Security & Governance

  • Enterprise authentication integration
  • API gateway compatibility
  • Request/response logging
  • Compliance and audit trails

Step-by-Step Setup

Follow these steps to connect to your internal APIs

Step 1: Install the Internal API MCP Server

Install the Internal API MCP server on your development machine:

# Install the Internal API MCP server
npm install -g @mcp/internal-api-server

# Verify installation
mcp --version

Step 2: Get API Access Credentials (Ask Your DevOps Team)

Contact your DevOps team or check your company's API portal for:

  • API Base URLs (e.g., https://api.company.com)
  • OAuth2 Client ID and Secret (for authenticated APIs)
  • API Keys (for services using API key authentication)
  • Service Discovery Endpoint (if using service mesh)
  • API Documentation URLs (OpenAPI/Swagger specs)

Step 3: Configure Your API Connections

Set up connections to your internal APIs:

For OAuth2-protected APIs:

# Configure OAuth2 API endpoint
mcp config internal-api add \
  --name "user-service" \
  --url https://api.company.com/users \
  --auth-type oauth2 \
  --client-id "your-client-id" \
  --client-secret "your-client-secret" \
  --scope "read:users"

For API Key-protected services:

# Configure API key endpoint
mcp config internal-api add \
  --name "payment-service" \
  --url https://api.company.com/payments \
  --auth-type apikey \
  --api-key "your-api-key-here" \
  --header-name "X-API-Key"

For public internal APIs:

# Configure public endpoint
mcp config internal-api add \
  --name "health-check" \
  --url https://api.company.com/health \
  --auth-type none

Step 4: Test Your API Connections

Verify that your API connections are working:

# Test all configured APIs
mcp test internal-api

# Test specific API endpoint
mcp test internal-api --endpoint user-service

# If successful, you should see:
# ✅ user-service: Connected successfully
# ✅ payment-service: Connected successfully
# ✅ health-check: Connected successfully

Step 5: Import API Documentation (Optional)

If your APIs have OpenAPI/Swagger documentation, import them for better integration:

# Import OpenAPI specification
mcp config internal-api import-openapi \
  --name "user-service" \
  --spec-url https://api.company.com/users/swagger.json

# Import from local file
mcp config internal-api import-openapi \
  --name "payment-service" \
  --spec-file ./api-specs/payment-api.yml

Usage Examples

Access your internal APIs through Copilot and MCP integration

Method 1: Ask GitHub Copilot (Recommended)

In your IDE with GitHub Copilot, you can ask natural language questions:

Example questions you can ask Copilot:

  • "Get user details for employee ID 12345 from the user service"
  • "What are the available payment methods from the payment API?"
  • "Check the health status of all internal services"
  • "Find all APIs that handle customer data"
  • "Show me the schema for the user profile endpoint"
  • "What authentication tokens do I need for the inventory API?"

Copilot will automatically use your MCP API connections to answer these questions!

Method 2: Direct MCP Commands

You can also query your APIs directly from your terminal:

Query user information:

mcp query internal-api "get user details for employee ID 12345"

Search across multiple APIs:

mcp query internal-api "find all APIs related to payment processing"

Get API health status:

mcp query internal-api "show health status for all registered APIs"

List available endpoints:

mcp query internal-api "list all available endpoints for user-service"