← Back to DevHub

Quick Start Guide

Get started with DevHub APIs in 3 simple steps

Why DevHub APIs?

Standard Protocol

All APIs use the Model Context Protocol (MCP) - a standardized JSON-RPC 2.0 interface.

Always Available

All APIs are hosted on Vercel with 99.99% uptime and global CDN distribution.

Lightning Fast

Optimized for speed with minimal latency and efficient data transfer.

Code Examples

All DevHub APIs use the MCP (Model Context Protocol) - a JSON-RPC 2.0 based protocol. Here's how to make your first API call:

cURL
curl -X POST https://bookchaowalit-portfolio-frontend.vercel.app/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'
JavaScript
const response = await fetch(
  'https://bookchaowalit-portfolio-frontend.vercel.app/api/mcp',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 1,
      method: 'tools/list'
    })
  }
);
const data = await response.json();
Python
import requests

response = requests.post(
  'https://bookchaowalit-portfolio-frontend.vercel.app/api/mcp',
  json={
    'jsonrpc': '2.0',
    'id': 1,
    'method': 'tools/list'
  }
)
data = response.json()

Available MCP Methods

GET

initialize

Initialize the MCP server connection. Returns server capabilities and protocol version.

GET

tools/list

List all available tools/functions provided by the API server.

POST

tools/call

Execute a specific tool with parameters. Returns the tool's output or result.

Response Format

All API responses follow the JSON-RPC 2.0 specification:

Example Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "get_projects",
        "description": "Get all projects from the portfolio",
        "inputSchema": {
          "type": "object",
          "properties": {}
        }
      }
    ]
  }
}

Ready to Build?

Try the interactive playground to test APIs directly in your browser.

Open Playground