API Documentation

Everything you need to integrate MCPBridge into your application.

Interactive API Explorer

Getting Started

MCPBridge provides a simple HTTP API to access all your MCP tools from any application or programming language.

Your API Endpoint

After signing up, you'll receive a personal API endpoint:

https://your-account.mcpbrid.ge/api/v1/

Quick Example

Here's how to call a tool with a simple HTTP request:

curl -X POST https://your-account.mcpbrid.ge/api/v1/tools/call \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "file_reader",
    "input": {"path": "/path/to/file.txt"}
  }'

Response Format

All API responses follow this format:

{
  "success": true,
  "data": {
    "result": "Tool output here..."
  }
}

Authentication

All API requests require an API key, which you can find in your MCPBridge dashboard.

Using Your API Key

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Keep it secure: Never expose your API key in client-side code. Use it only on your server.

Interactive API Explorer

Use the interactive API explorer below to test endpoints and see detailed request/response examples.

OpenAPI Specification: You can also download our OpenAPI specification to generate client libraries for your preferred programming language.

Using Tools

Tools are the primary way to interact with your MCP servers. Use the interactive API explorer above to test tool calls.

Common Tool Operations

  • List Tools: GET /tools - See all available tools from your connected MCP servers
  • Call Tool: POST /tools/call - Execute a tool with specific arguments

Reading Resources

Resources provide access to files, documents, and other data from your MCP servers.

Resource Operations

  • List Resources: GET /resources - See all available resources
  • Read Resource: POST /resources/read - Get the content of a specific resource

Working with Prompts

Prompts are templates that help you interact with AI models using data from your MCP servers.

Prompt Operations

  • List Prompts: GET /prompts - See all available prompts
  • Get Prompt: POST /prompts/get - Get a formatted prompt with your arguments

Error Handling

All API errors follow a consistent format:

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error message"
  }
}

Common Error Codes

  • UNAUTHORIZED - Invalid or missing API key
  • INVALID_REQUEST - Malformed request or missing parameters
  • NOT_FOUND - Tool, resource, or prompt not found
  • INTERNAL_ERROR - Server error

Code Examples

JavaScript/Node.js

const response = await fetch('https://your-account.mcpbrid.ge/api/v1/tools/call', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    tool: 'file_reader',
    input: { path: '/path/to/file.txt' }
  })
});

const data = await response.json();
console.log(data.data.result);

Python

import requests

response = requests.post(
    'https://your-account.mcpbrid.ge/api/v1/tools/call',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'tool': 'file_reader',
        'input': {'path': '/path/to/file.txt'}
    }
)

data = response.json()
print(data['data']['result'])

Go

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    payload := map[string]interface{}{
        "tool": "file_reader",
        "input": map[string]string{
            "path": "/path/to/file.txt",
        },
    }
    
    jsonPayload, _ := json.Marshal(payload)
    
    req, _ := http.NewRequest("POST", 
        "https://your-account.mcpbrid.ge/api/v1/tools/call", 
        bytes.NewBuffer(jsonPayload))
    
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")
    
    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()
    
    // Process response...
}
Generate Client Libraries: Use our OpenAPI specification with tools like OpenAPI Generator to create client libraries for your preferred programming language.