DataBridge MCP server

Integrates with DataBridge to enable ingestion and retrieval of contextual information from a local database, supporting persistent storage for AI applications.
Back to servers
Provider
DataBridge
Release date
Feb 19, 2025
Language
Python
Stats
7 stars

This server implements the Model Context Protocol (MCP), enabling connections to different ML services through a unified interface. It provides simple API access to various models including those from Anthropic, OpenAI, Cohere, Google, Mistral, and others while abstracting away their specific implementation details.

Installation

Prerequisites

  • Python 3.8 or higher
  • uv package manager

Install with uv

uv venv
source .venv/bin/activate
uv pip install mcp-server

Install with pip

pip install mcp-server

Configuration

Create a .env file in your project directory with the necessary API keys:

# OpenAI
OPENAI_API_KEY=your_openai_key_here

# Anthropic
ANTHROPIC_API_KEY=your_anthropic_key_here

# Google
GOOGLE_API_KEY=your_google_key_here

# Mistral
MISTRAL_API_KEY=your_mistral_key_here

Running the Server

Basic Usage

Start the server with the default configuration:

mcp-server

Custom Port

Specify a custom port:

mcp-server --port 8001

Using Environment Variables

You can also configure the server using environment variables:

MCP_SERVER_PORT=8001 mcp-server

Connecting to the Server

Using the HTTP API

Send requests to the server using standard HTTP methods:

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-3-opus",
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ]
  }'

Supported Models

The server supports multiple model providers:

  • Anthropic: anthropic/claude-3-opus, anthropic/claude-3-sonnet, anthropic/claude-3-haiku
  • OpenAI: openai/gpt-4, openai/gpt-4-turbo, openai/gpt-3.5-turbo
  • Google: google/gemini-pro, google/gemini-1.5-pro
  • Mistral: mistral/mistral-small, mistral/mistral-medium, mistral/mistral-large

Request Format

Requests should follow this general structure:

{
  "model": "provider/model-name",
  "messages": [
    {"role": "system", "content": "Optional system message"},
    {"role": "user", "content": "User message here"}
  ],
  "temperature": 0.7,
  "max_tokens": 1000
}

Advanced Configuration

Configuring Model Defaults

Create a config.json file to set model-specific defaults:

{
  "models": {
    "anthropic/claude-3-opus": {
      "temperature": 0.5,
      "max_tokens": 2000
    }
  }
}

Then start the server with:

mcp-server --config config.json

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later