Sign inSign up

nautilusops/mcp-center

By nautilusops

•Updated about 1 year ago

MCP Center provides a high-performance proxy service between MCP clients and multiple MCP servers.

Image
Networking
Machine learning & AI
Web servers
0

1.4K

nautilusops/mcp-center repository overview

⁠Quick Start

⁠🚀 Quick Deployment

# 1. Pull the latest image
docker pull nautilusops/mcp-center:latest

# 2. Start the container
docker run -d \
  --name mcp-center \
  -p 5432:5432 \
  -e MCP_ADMIN_TOKEN=your-custom-token \
  -e POSTGRES_HOST=your-postgres-host \
  -e POSTGRES_PORT=your-postgres-port
  -e POSTGRES_USERNAME=your-postgres-username
  -e POSTGRES_PASSWORD=your-postgres-password
  -e POSTGRES_DATABASE=your-postgres-database
  nautilusops/mcp-center:latest
⁠Method 2: Using Helm (Kubernetes)
# Deploy with default configuration (includes PostgreSQL)
helm install mcp-center . --create-namespace --namespace mcp-center
  1. Copy the example configuration file:
cp values-custom.yaml my-values.yaml
  1. Edit the configuration file and set your PostgreSQL connection information:
postgresql:
  enabled: false

externalPostgresql:
  host: "your-postgres-host.example.com"
  port: 5432
  username: "mcpcenter"
  password: "your-secure-password"
  database: "mcpcenter"
  1. Deploy with custom configuration:
helm install mcp-center . -f my-values.yaml --create-namespace --namespace mcp-center
⁠Configuration
⁠PostgreSQL Configuration
  • postgresql.enabled: Whether to enable built-in PostgreSQL
    • true: Use built-in PostgreSQL (requires storage class support)
    • false: Use external PostgreSQL
⁠External PostgreSQL Configuration

When postgresql.enabled: false, configure the following parameters:

  • externalPostgresql.host: PostgreSQL server address
  • externalPostgresql.port: PostgreSQL port (default 5432)
  • externalPostgresql.username: Database username
  • externalPostgresql.password: Database password (stored securely in Kubernetes Secret)
  • externalPostgresql.database: Database name
⁠MCP Admin Token Configuration
  • mcpAdminToken: 32-character random string for MCP admin authentication
    • Default: Auto-generated 32-character random string
    • Custom: You can set your own token in values.yaml
⁠Environment Variables

The application will automatically receive the following environment variables:

  • POSTGRES_HOST: PostgreSQL host address
  • POSTGRES_PORT: PostgreSQL port
  • POSTGRES_USERNAME: Database username
  • POSTGRES_PASSWORD: Database password
  • POSTGRES_DATABASE: Database name
  • MCP_ADMIN_TOKEN: 32-character random string for admin authentication
⁠Troubleshooting
⁠Built-in PostgreSQL Cannot Start
  • Check if the cluster has available storage classes
  • Check if there is sufficient storage space
  • View Pod logs: kubectl logs -n mcp-center <pod-name>
⁠External PostgreSQL Connection Failed
  • Check network connectivity
  • Verify if PostgreSQL service is accessible
  • Check if username, password, and database name are correct

⁠Usage Examples

⁠1. Register MCP Server
curl -X POST http://localhost:5432/api/registry/mcp-server \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-admin-token" \
  -d '{
    "name": "my-mcp-server",
    "tag": "1.0.0",
    "endpoint": "http://my-server:8080/sse",
    "transport_type": "sse",
    "description": "My MCP server"
  }'
⁠2. Get All MCP Servers
curl -X GET http://localhost:5432/api/registry/mcp-server \
  -H "Authorization: Bearer your-admin-token"
⁠3. Connect to MCP Server via Proxy
curl -X GET http://localhost:5432/proxy/connect/my-mcp-server/1.0.0 \
  -H "Authorization: Bearer your-api-key"

⁠🔗 Connect to MCP Servers

⁠Go Language Example
package main

import (
    "log"
    "github.com/modelcontextprotocol/go-sdk/mcp"
)

func main() {
    // Using SSE transport
    transport := mcp.NewSSEClientTransport(
        "http://localhost:5432/proxy/connect/example-server/1.0.0",
        nil,
    )
    
    // Using Streamable transport
    transport := mcp.NewStreamableClientTransport(
        "http://localhost:5432/proxy/connect/example-server/2.0.0",
        nil,
    )
    
    // Create client
    client := mcp.NewClient(&mcp.Implementation{
		Name:    "mcp-client",
		Version: "1.0.0",
	}, nil)
    
    // Initialize connection
    session, err := client.Connect(context.Background(), transport)
	if err != nil {
		panic(err)
	}
    
    defer session.Close()
    
    // Use the client...
}
⁠Direct HTTP Access
# Test connection
curl -v http://localhost:5432/proxy/connect/example-server/1.0.0

Tag summary

Content type

Image

Digest

sha256:94f7576ea…

Size

35.5 MB

Last updated

about 1 year ago

docker pull nautilusops/mcp-center