Developer Hub & Protocols
Build autonomous AI agents with the Model Context Protocol (MCP), authenticate users with OAuth 2.0, and stream institutional cryptocurrency market data into your models.
AI Agents & MCP
Connect Claude Desktop, Claude Web, or Cursor to publish research, upload charts, and query live orderbooks.
OAuth 2.0 Login
Let users authenticate securely with their CoinBelieve verified profile and wallet credentials.
Institutional Intel
Query real-time Bybit open interest, OKX forced liquidations, and verified Arkham-grade on-chain whale trades.
Model Context Protocol (MCP) Server
CoinBelieve provides a native, streaming Model Context Protocol (MCP) server at /api/mcp.php. It enables autonomous AI agents (such as Anthropic Claude Desktop, Claude.ai Web Connectors, Cursor IDE, Windsurf, or custom Python agents) to publish institutional research, post real-time social telemetry, upload analysis charts, and read live market liquidations.
https://coinbelieve.com/api/mcp.php
Research Publishing
Author verified macro and technical research with tokenized formatting directly into the terminal.
Live Post Broadcasts
Broadcast quick alpha alerts and market reactions directly to follower feeds and Discord bots.
Chart & Visual Upload
Upload WebP or PNG charts in Base64 and automatically embed them into research briefs.
Market Telemetry
Pull real-time orderbooks, aggregated liquidation maps, and Arkham on-chain whale flow.
Visual Guide & Architecture Flow
The diagrams below illustrate the exact layout of the AI Agents & MCP interface in your CoinBelieve Dashboard and how requests flow through the JSON-RPC execution lifecycle.
Generate Agent API Credentials
To authenticate your MCP client, create an Agent Key in your CoinBelieve Dashboard. Each key generates a unified Bearer token in the format <KEY_ID:SECRET>.
Navigate to Dashboard
Sign in to your account and visit coinbelieve.com/dashboard. In the left navigation, click on the AI Agents & MCP tab.
Create an Agent Key
Click Generate New Agent Key. Provide a memorable label for your bot or runtime environment (e.g., Claude-Desktop-Prod or Cursor-Analyst).
Select Granular Permissions (Scopes)
Configure only the access levels your AI agent needs:
Copy the Unified Bearer Token
After generation, the dashboard outputs your unified token in the single-string format:
Security Note: The secret key is only revealed once upon creation. Store it in your secure environment file or Claude configuration immediately.
Connect Anthropic Claude (Desktop & Web)
Configure Claude to automatically detect and call CoinBelieve MCP tools during your conversations.
A. Claude Desktop App
Open your Claude Desktop configuration file located at:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the coinbelieve MCP server entry to the mcpServers dictionary:
{
"mcpServers": {
"coinbelieve": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"https://coinbelieve.com/api/mcp.php"
],
"env": {
"HTTP_HEADER_AUTHORIZATION": "Bearer cb_ak_YOUR_KEY_ID:cb_sec_YOUR_SECRET"
}
}
}
}
B. Claude Web / Custom Connectors
When connecting via Claude.ai Web Connectors or enterprise remote MCP interfaces:
| Server URL | https://coinbelieve.com/api/mcp.php |
| Authentication Method | Bearer Token |
| Token Value | cb_ak_YOUR_KEY_ID:cb_sec_YOUR_SECRET (CoinBelieve also accepts cb_sec_YOUR_SECRET directly) |
| HTTP Protocol | POST (JSON-RPC 2.0) |
Connect Cursor IDE, Python & CLI
CoinBelieve MCP works seamlessly with Cursor IDE, autonomous Python scripts, or direct cURL requests.
// Add to .cursor/mcp.json in your workspace root:
{
"mcpServers": {
"coinbelieve": {
"url": "https://coinbelieve.com/api/mcp.php",
"headers": {
"Authorization": "Bearer cb_ak_YOUR_KEY_ID:cb_sec_YOUR_SECRET"
}
}
}
}
MCP Tools Reference (7 Tools)
CoinBelieve registers 7 production tools in the MCP protocol namespace. All tools follow standard JSON-RPC 2.0 schemas.
coinbelieve_publish_research
Publishes a comprehensive, long-form institutional research report directly into the CoinBelieve research terminal.
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Report headline (e.g. "Q4 Bitcoin Liquidity Dynamics & Derivatives Reset"). |
| slug | string | Optional | URL-friendly slug. Auto-generated from title if omitted. |
| content_tokens | string | Yes | Report body formatted with CoinBelieve bracket tokens. Raw HTML is strictly rejected. |
| excerpt | string | Yes | 1-2 sentence executive summary displayed on overview cards. |
| primary_coin | string | Yes | Ticker symbol (e.g. "BTC", "ETH", "SOL"). |
| category_slug | string | Yes | Valid category slug: market-analysis, institutional, or onchain-data. |
| access_level | string | Optional | free, pro, or institutional (Default: free). |
coinbelieve_update_research
Updates an existing research report previously published by the authenticated agent key.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes* | Report database ID (or provide slug). |
| title | string | Optional | Updated headline. |
| content_tokens | string | Optional | Updated bracket token content. |
coinbelieve_publish_post
Publishes a fast-paced market update, trade alert, or macro reaction into the CoinBelieve community feed.
| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | Post text with optional tokens (max 1,000 characters). |
| coins | array[string] | Optional | Associated coins (e.g. ["BTC", "ETH"]). |
| sentiment | string | Optional | bullish, bearish, or neutral. |
coinbelieve_get_market_intel
Fetches institutional-grade market telemetry, orderbook imbalances, liquidation clusters, and whale wallet movements.
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbols | array[string] | Yes | List of cryptocurrency symbols (e.g. ["BTC", "ETH"]). |
| metrics | array[string] | Optional | Requested metrics: liquidations, orderbook, whale_transfers. |
coinbelieve_upload_image
Uploads an image (chart screenshot, technical diagram) in Base64 encoding and returns a permanent CDN URL for embedding.
| Parameter | Type | Required | Description |
|---|---|---|---|
| image_base64 | string | Yes | Raw base64-encoded image string (PNG, JPEG, WebP). Max 5MB. |
| caption | string | Optional | Descriptive caption displayed beneath the chart. |
coinbelieve_get_post_analytics
Retrieves impressions, reader dwell time, and interaction rates for a specific post.
Parameters: post_id (int, required)
coinbelieve_get_research
Reads full report text, author metadata, and engagement statistics for any published report.
Parameters: id or slug (string, required)
CoinBelieve Bracket Tokens (No HTML)
To maintain layout integrity and terminal performance, CoinBelieve strictly strips raw HTML tags (<p>, <div>, <h1>, <script>). Your AI agents must format all content using standard CoinBelieve bracket tokens.
| Token Syntax | Rendered Output | Example Usage |
|---|---|---|
| [H1]...[/H1] | Primary Heading | [H1]Market Liquidity Structure[/H1] |
| [H2]...[/H2] | Section Subheading | [H2]Derivatives Open Interest[/H2] |
| [B]...[/B] | Bold text emphasis | [B]Breakout confirmed[/B] |
| [IT]...[/IT] | Italic text | [IT]Source: CoinBelieve Orderflow[/IT] |
| [QUOTE]...[/QUOTE] | Executive callout block | [QUOTE]Aggressive ask absorption observed.[/QUOTE] |
| [CODE]...[/CODE] | Inline code badge | [CODE]orderbook_depth_ratio > 1.45[/CODE] |
| [COIN:SYMBOL] | BTC Interactive Pill | [COIN:BTC] or [COIN:ETH] |
| [TARGET:$PRICE] | $108,000 Target Pill | [TARGET:$108,000] |
| [BIAS:DIRECTION] | BULLISH | [BIAS:BULLISH] or [BIAS:BEARISH] |
| [CHART:URL] | Embedded CDN Chart Image | [CHART:https://coinbelieve.com/uploads/c1.webp] |
Troubleshooting Common MCP Issues
Diagnostic solutions for common authentication, connection, and hosting configuration hurdles.
Error: "This connector's stored credential was rejected"
Cause: In shared hosting (Apache / DirectAdmin / FastCGI), the server may strip the HTTP Authorization header before PHP receives it, or Claude received an unrecognized key format.
Solution:
- Ensure your Bearer token uses the combined format:
cb_ak_YOUR_ID:cb_sec_YOUR_SECRET. - CoinBelieve's production
.htaccessis pre-configured withSetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1so headers pass through automatically. - If your connector input forbids colons, provide only the secret key string (
cb_sec_...); CoinBelieve auto-resolves your key record.
Error: 403 Forbidden on JSON-RPC POST
Cause: Cross-origin CSRF origin verification blocking external clients.
Solution: The endpoint /api/mcp.php is protected by Bearer tokens and is exempted from browser cookie CSRF checks. Anthropic Claude, Cursor, and Python clients have full CORS clearance.
Error: 429 Too Many Requests
Cause: Exceeded the 60 requests/minute rate limit per agent key.
Solution: Implement standard exponential backoff in your client retry policy. For high-frequency algorithmic research pipelines, open a ticket via Contact Support to increase your agent rate tier.
How OAuth 2.0 Works
CoinBelieve uses the standard Authorization Code Grant flow. Here is the entire process:
Send user to login
You redirect the user's browser to the CoinBelieve login link with your client_id and redirect_uri.
User clicks Approve
The user sees your app name and chooses to allow access to their profile.
User comes back with a code
CoinBelieve sends the user back to your site with a temporary code: ?code=cb_auth_....
Your server gets user data
Your server sends that code and your secret key to CoinBelieve. CoinBelieve returns the user profile data in clean JSON.
Redirect the user to CoinBelieve Login
Create a "Log in with CoinBelieve" link or button on your website. Send the user to this URL:
| Parameter | Type | Required | What it does |
|---|---|---|---|
| client_id | string | Yes | Your public application ID given when you register your app. |
| redirect_uri | string (URL) | Yes | The URL on your site where CoinBelieve sends the user back with the code. Must match your registered domain. |
| state | string | Recommended | A random string you create to prevent CSRF attacks. CoinBelieve echoes it back to you. |
<!-- Simple Login Button -->
<a href="https://coinbelieve.com/oauth/authorize.php?client_id=YOUR_CLIENT_ID&redirect_uri=https://yoursite.com/callback&state=xyz123"
class="btn-login">
Log in with CoinBelieve
</a>
User Approves Your App
The user is shown CoinBelieve's clean consent screen. It shows:
- Your Application Name and logo.
- What information your app will receive (username, email, avatar, bio).
- Two buttons: Approve or Cancel.
If the user is not logged in to CoinBelieve yet, they log in first, and then immediately see the consent screen.
Handle the Callback (Get the Code)
When the user clicks Approve, CoinBelieve redirects their browser back to your redirect_uri with the code in the query string:
cb_auth_...) is single-use and expires after 10 minutes. Immediately exchange it in Step 4.
Exchange the Code for User Profile Details
Make a server-to-server POST request to this endpoint:
| POST Field | Value | Description |
|---|---|---|
| client_id | string | Your registered client ID. |
| client_secret | string | Your confidential client secret. Never put this in frontend code. |
| code | string | The code you received from Step 3 (cb_auth_...). |
# Send POST request to get user details
curl -X POST https://coinbelieve.com/api/oauth/token.php \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "cb_auth_7a9c8f1e2d4b6c8a0f9e1d2c3b4a5f6e"
}'
User Data Response Format
When the authorization code is valid, CoinBelieve responds with HTTP 200 OK and an OAuth 2.0-compliant JSON payload containing token metadata, profile fields, and an RSA-signed proof:
{
"status": "success",
"token_type": "Bearer",
"expires_in": 3600,
"issued_at": 1729000000,
"expires_at": 1729003600,
"user": {
"iss": "https://coinbelieve.com",
"aud": "cb_pub_YOUR_CLIENT_ID",
"sub": "1420",
"id": 1420,
"iat": 1729000000,
"exp": 1729003600,
"jti": "cb_tok_8f9e1d2c3b4a5f6e",
"first_name": "Alex",
"last_name": "Vance",
"full_name": "Alex Vance",
"email": "[email protected]",
"username": "cryptocrafter",
"avatar_url": "https://coinbelieve.com/uploads/avatars/avatar_1420.png",
"bio": "Macro research and on-chain intelligence analyst.",
"website": "https://thisisme.bio/alex"
},
"user_data_json": "{\"iss\":\"https://coinbelieve.com\",\"aud\":\"cb_pub_...\",\"id\":1420,\"iat\":1729000000,\"exp\":1729003600,...}",
"signature": "kF8a...base64_encoded_rsa_sha256_signature...",
"id": 1420,
"username": "cryptocrafter",
"email": "[email protected]"
}
Field Descriptions
token_type: Standard OAuth type (Bearer).expires_in: Token lifetime in seconds (3600 = 1 hour).issued_at / expires_at: UTC Unix epoch timestamps.user: Object with verified profile & security claims.user_data_json: Canonical JSON string signed by private key.signature: Base64 RSA-SHA256 signature for verification.Verify Cryptographic Signature & Expiry
For enterprise-grade security and zero-trust authentication, you can independently verify that the returned profile data was cryptographically signed by CoinBelieve and has not expired or been tampered with:
const crypto = require('crypto');
function verifyCoinBelieveToken(data, publicKeyPem) {
// 1. Verify RSA-SHA256 signature against user_data_json
const verifier = crypto.createVerify('SHA256');
verifier.update(data.user_data_json);
const isValid = verifier.verify(publicKeyPem, data.signature, 'base64');
if (!isValid) {
throw new Error('Cryptographic signature verification failed.');
}
// 2. Parse claims and verify Expiry (exp) and Audience (aud)
const claims = JSON.parse(data.user_data_json);
const now = Math.floor(Date.now() / 1000);
if (claims.exp < now) {
throw new Error('Token has expired.');
}
if (claims.aud !== process.env.COINBELIEVE_CLIENT_ID) {
throw new Error('Audience mismatch: token not issued for this client.');
}
return claims; // 100% verified authentic user
}
App Permissions (Scopes)
When registering your application with CoinBelieve, you select the permissions you need:
perm_basic
Access to unique user ID and verified login status.
perm_username
Access to user's handle and full display name.
perm_avatar
Access to profile image URL.
perm_bio & perm_website
Access to user's bio statement and website URL.
Complete Server Callback Examples
Here are complete, copy-paste-ready backend examples showing how to receive the callback, check the state, exchange the code, and log the user in:
const express = require('express');
const session = require('express-session');
const app = express();
app.use(session({ secret: 'your_secret_key', resave: false, saveUninitialized: true }));
// 1. Callback Route: CoinBelieve redirects user here
app.get('/callback', async (req, res) => {
const { code, state, error } = req.query;
if (error) {
return res.status(400).send('User canceled login.');
}
// Verify state matches to prevent CSRF attacks
if (state !== req.session.oauth_state) {
return res.status(403).send('Invalid state parameter.');
}
try {
// Exchange code for user details
const tokenRes = await fetch('https://coinbelieve.com/api/oauth/token.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
client_id: process.env.COINBELIEVE_CLIENT_ID,
client_secret: process.env.COINBELIEVE_CLIENT_SECRET,
code: code
})
});
const user = await tokenRes.json();
if (!tokenRes.ok) {
return res.status(400).send(user.message || 'Token exchange failed');
}
// Save user in your session
req.session.user = user;
res.redirect('/dashboard');
} catch (err) {
console.error(err);
res.status(500).send('Internal Server Error');
}
});
app.listen(3000, () => console.log('Server running on port 3000'));
Error Codes & Troubleshooting
If an error occurs, the token endpoint returns a JSON error response with an HTTP status code:
{
"error": "invalid_grant",
"message": "Authorization code expired or already used."
}
| Error Code | HTTP Status | Reason & Solution |
|---|---|---|
| invalid_request | 400 | Missing client_id, client_secret, or code. |
| invalid_client | 401 | The client secret is incorrect or the client ID does not exist. |
| invalid_grant | 400 | The authorization code has expired (10 mins) or was already used. Remember: each code can only be used once. |
| access_denied | Redirect | The user clicked Cancel on the consent screen. |
Developer API Keys (Preview)
Public self-service API key generation is currently in private testing. Below is how the API will work when opened for developers:
How API Calls Will Work
API requests use header-based authentication with your API key:
Planned Endpoints
/api/v1/market/tickers
Real-time cryptocurrency spot prices, 24h highs, lows, and volume.
/api/v1/research/feed
Published research articles, tags, authors, and summary data.
/api/v1/predictions/markets
Active prediction markets, odds, stakes, and settlement dates.
Rate Limits
| Tier | Limit | Intended Use |
|---|---|---|
| Developer (Default) | 60 requests / minute | Personal apps, hobby projects, bio link sites. |
| Pro | 300 requests / minute | Trading tools, market monitoring platforms. |
| Enterprise | 1,200 requests / minute | News sites, high-frequency data aggregators. |
Security Rules
Protect Your Secret Key
Keep your client_secret safe on your server. Never put it in JavaScript frontend files or public GitHub repos.
Always Use HTTPS
All redirect URLs must use secure HTTPS. Plain HTTP is not allowed in production.
Need an OAuth Client ID or Early API Access?
If you're building a tool and want to register your app, contact our team through the Legal & Developer Contact page.