MCP server¶
Single endpoint, implemented in api/mcp/index.mjs:
POST https://dishonkadoh.com/api/mcp
Request handling¶
Method: only
POSTis accepted — anything else gets405 method_not_allowedwith anAllow: POSTheader.Origin check: if an
Originheader is present, it must behttps://dishonkadoh.comor the request is rejected with403 invalid_origin. Requests with noOriginheader (e.g. most non-browser MCP clients) pass through.Auth: every request needs
Authorization: Bearer <token>— see Authentication. A missing/invalid/expired token returns401 invalid_tokenwith aWWW-Authenticate: Bearer realm="DK Business Solutions MCP", resource="..."header, per the MCP auth spec.Body: must be a JSON-RPC 2.0 object (
{"jsonrpc": "2.0", "id", "method", "params"}) — anything else gets a JSON-RPC-32600 Invalid Requesterror (still returned as HTTP200, per JSON-RPC convention).
Supported methods¶
Method |
Behavior |
|---|---|
|
Returns |
|
Acknowledged with a bare |
|
Returns the real tool list (currently just |
|
Dispatches to the named tool |
anything else |
JSON-RPC |
Example: listing tools¶
POST /api/mcp
Authorization: Bearer <access_token>
Content-Type: application/json
{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "company_information",
"description": "Returns information about DK Business Solutions.",
"inputSchema": { "type": "object", "properties": {} }
}
]
}
}
For calling the tool itself, see Tools.