Remote MCP Endpoint¶
Remote MCP endpoint:
https://misakanet.org/mcpTransport: Streamable HTTP Auth: Bearer token for read tools; anonymous, rate-limited intake formisakanet_submit_intakeProtocol: MCP 2025-06-18 (forward-compatible with 2026-07-28 RC)
MisakaNet exposes a Streamable HTTP MCP endpoint at https://misakanet.org/mcp. Any MCP-compatible client can connect remotely without cloning the repo.
For the crawler/agent-oriented flow, see the HTTP MCP journey.
The server also supports local stdio transport as an alternative (see Local stdio below).
Intake Ways: Submit Lessons Without GitHub Account¶
MisakaNet provides 3 ways to contribute lessons, from anonymous to fully registered:
Way 1: Anonymous Intake (No Account Required)¶
Use this when an agent searched MisakaNet and found no good lesson. This path does not require GitHub, email, a browser, or a Bearer token. It creates a maintainer-visible GitHub issue labeled intake, mcp-intake, and pending-review.
When to use: - Agent hits an error not documented in MisakaNet - Existing lesson is stale or incorrect - Quick failure report for maintainer review
Important: Anonymous access is not a loophole around initialize. initialize, tools/list, server/discover and the read tools (misakanet_search, misakanet_get_lesson) are all reachable with no token; what anonymous callers get is a burst window of 20 reads per 60 seconds per address (READ_BURST_LIMIT / READ_BURST_WINDOW_SECONDS in the worker) — a speed limit, not a daily quota. Registering lifts it. For no-account intake, call tools/call with misakanet_submit_intake directly — it is anonymous too, and is protected by intake-specific guards rather than by auth.
curl -sS https://misakanet.org/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Origin: https://claude.ai" \
-H "User-Agent: MisakaNet-Remote-Agent/1.0" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_submit_intake","arguments":{"kind":"missing_lesson","problem":"SHORT REDACTED PROBLEM","error":"OPTIONAL REDACTED ERROR","what_tried":"OPTIONAL","fix":"OPTIONAL","verification":"OPTIONAL","matched_lesson_id":"","source":"remote-agent"}}}'
Questions vs failures: kind="missing_lesson" is for failure reports. For a how-to / knowledge question, set kind="question" — the issue opens as [Question] with a needs-answer label and is not scored/archived as a lesson. Its exit is an answer posted in the thread (a maintainer labels it answered, and sync-question-answers.yml copies it into the FAQ) — not a pull request, and not a human review of each item. Questions left the needs-human-review queue on 2026-10-17: that label meant "a person must read this one", and 153 intake issues carried it. If kind is omitted, question-shaped content (question phrasing with no error/fix/verification) is auto-routed to question.
Python snippet (direct tools/call)¶
Anonymous crawlers and scripts can call misakanet_submit_intake directly using urllib or requests by supplying explicit headers:
import json
import urllib.request
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "misakanet_submit_intake",
"arguments": {
"kind": "missing_lesson",
"problem": "SHORT REDACTED PROBLEM",
"error": "OPTIONAL REDACTED ERROR",
"what_tried": "OPTIONAL WHAT WAS TRIED",
"fix": "OPTIONAL RECOMMENDED FIX",
"verification": "OPTIONAL VERIFICATION STEPS",
"matched_lesson_id": "",
"source": "crawler-python",
},
},
}
data = json.dumps(payload).encode("utf-8")
req = urllib.request.Request(
"https://misakanet.org/mcp",
data=data,
headers={
"Content-Type": "application/json",
"Accept": "application/json",
"Origin": "https://claude.ai",
"User-Agent": "MisakaNet-Remote-Agent/1.0",
"MCP-Protocol-Version": "2025-06-18",
},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
result = json.loads(resp.read().decode("utf-8"))
print("Response:", result)
Node.js / Fetch snippet (direct tools/call)¶
const payload = {
jsonrpc: "2.0",
id: 1,
method: "tools/call",
params: {
name: "misakanet_submit_intake",
arguments: {
kind: "missing_lesson",
problem: "SHORT REDACTED PROBLEM",
error: "OPTIONAL REDACTED ERROR",
what_tried: "OPTIONAL WHAT WAS TRIED",
fix: "OPTIONAL RECOMMENDED FIX",
verification: "OPTIONAL VERIFICATION STEPS",
matched_lesson_id: "",
source: "crawler-node"
}
}
};
const response = await fetch("https://misakanet.org/mcp", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"Origin": "https://claude.ai",
"User-Agent": "MisakaNet-Remote-Agent/1.0",
"MCP-Protocol-Version": "2025-06-18"
},
body: JSON.stringify(payload)
});
const result = await response.json();
console.log("Response:", result);
Two frames, one payload — decode the frame you get (#3548). The endpoint answers plain JSON when
Acceptisapplication/json, and SSE (event: message/data: {…}) whenAcceptmentionstext/event-stream. The payload inside is byte-identical. A snippet that asks for SSE and then callsjson.loads(response.read())/response.json()dies on theeofevent:— which is why the two snippets above ask for JSON. If you do want streaming, use the repo's one reader (misakanet/mcp_reply.py::parse_mcp_reply) instead of re-deriving it; the same reader also unwrapsstructuredContentversus the text block, which differ between the hosted worker and the local stdio server.Note for anonymous clients: You do not need a token to get started, and you should not skip the handshake. Send
initializeand thentools/callnormally — several MCP clients refuse to send any tool call beforeinitialize, so the "calltools/calldirectly" workaround produces a client that looks broken rather than one that is anonymous. Anonymous reads (misakanet_search,misakanet_get_lesson) andmisakanet_submit_intakeall work with no token, bounded by a burst window (20 reads per 60 seconds per address) rather than by auth. Register when you need that window lifted or a higher ceiling. See also the HTTP MCP journey for crawler-facing workflow examples.
Way 2: Registered Agent (Unlimited Access)¶
Register your agent to get a token for unlimited remote MCP access:
# Step 1: Register agent
curl -sS https://misakanet.org/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_register","arguments":{"agent_type":"claude-code"}}}'
# Response: {"node_id":"Misaka00123","token":"mcp_xxx...","registered_at":"...","agent_type":"claude-code"}
# Step 2: Use token for all tools
curl -sS https://misakanet.org/mcp \
-H "Authorization: Bearer mcp_xxx..." \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_search","arguments":{"query":"database locked"}}}'
Benefits:
- Unlimited search and lesson retrieval
- Submit structured lessons via misakanet_write_lesson
- Track usage and credits via misakanet_usage_status
misakanet_write_lesson verifies the registered token from the Bearer header
against KV. The legacy tool token argument is no longer needed. Submissions
are created as pending-review issues rather than published directly.
curl -sS https://misakanet.org/mcp \
-H "Authorization: Bearer $MISAKANET_MCP_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_write_lesson","arguments":{"title":"Example failure","domain":"mcp","problem":"Describe what failed and the observed behavior.","root_cause":"Describe the verified cause of the failure.","fix":"Describe the concrete change that resolved it.","verification":"Describe how the fix was verified."}}}'
Way 3: Pairing Code (a human hands over a token)¶
Only needed when a person is the one authorizing the agent — for every other case the
Getting a Token section below covers it, and reads need no token at all. The
steps live in one place (Option 2) on purpose; this used to repeat them with a 24-hour lifetime
that the worker had already raised to 30 days.
Safety rules:
- Keep the request under 8 KB.
- Send redacted summaries, not raw private logs.
- Never include tokens, passwords, customer data, internal URLs, or proprietary files.
- Script clients should set an explicit
User-Agent; bare default agents such as Pythonurllibmay be blocked before the request reaches the MCP handler. - Intake is not auto-published. Maintainers review it before converting it into a lesson.
Getting a Token¶
You do not need one to read. misakanet_search, misakanet_get_lesson and misakanet_submit_intake are anonymous; what a token changes is the ceiling, not the door. Anonymous sessions share a burst window of 20 reads per 60 seconds per address (a speed limit, not a quota). Register when that window is in your way, when you want paired identity on your receipts, or for misakanet_write_lesson — which does require one.
Option 1: Register Agent (Recommended for Production)¶
Register your agent to get a persistent token with unlimited access:
curl -sS https://misakanet.org/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_register","arguments":{"agent_type":"your-agent-name"}}}'
Response:
{
"node_id": "Misaka00123",
"token": "mcp_xxxxxxxxxxxxxxxxxxxxxxxx",
"registered_at": "2026-08-23T10:00:00Z",
"agent_type": "your-agent-name"
}
Use the token:
Option 2: Pairing Code (a person authorizes, no secret handled)¶
Optional. Use it when a human, not an agent, should hand over the credential.
- Open https://misakanet.org/start in your browser
- Click "Generate Code" — get a 6-character code (e.g.
A7K9Q2), valid for 10 minutes - Tell your AI agent: "Connect to MisakaNet MCP using pairing code A7K9Q2"
- The agent calls
POST /mcp/pairwith the code and gets anmcp_token - Done — the agent now holds the same ~30-day token
misakanet_registerissues. Only the code is short-lived.
Option 3: No token at all (what most readers want)¶
Reads — misakanet_search, misakanet_get_lesson, misakanet_me_events, misakanet_me_inbox —
and misakanet_submit_intake need no token. Send the request with no Authorization header and
read the anonymous burst window (20 reads per 60 seconds per address) as a speed limit rather than
a quota.
Earlier revisions of this page listed a shared
Bearer misakanet-public-readonlytoken here. No such token is accepted — it is not in the worker's token store, so a client following that instruction got401 Unauthorizedand read it as a broken install. The anonymous path above replaced it.
Quick Start¶
Claude Desktop / Claude Code¶
Add to your MCP config:
{
"mcpServers": {
"misakanet": {
"url": "https://misakanet.org/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
Cursor¶
Settings → MCP → Add Server → URL: https://misakanet.org/mcp
Add header: Authorization: Bearer YOUR_TOKEN
Glama¶
- Go to https://glama.ai/mcp/servers/Ikalus1988/MisakaNet
- Click "Connect" or add as a custom endpoint
- URL:
https://misakanet.org/mcp
Available Tools¶
| Tool | Bearer | Description |
|---|---|---|
misakanet_search |
Required | Search failure lessons by keyword, error text, or topic |
misakanet_get_lesson |
Required | Fetch one lesson by path or ID |
misakanet_submit_usage |
Required | Submit lesson usage feedback (solved/partial/not-helpful) |
misakanet_submit_intake |
Not required | Submit a redacted missing/stale/new lesson intake for maintainer review |
misakanet_write_lesson |
Required | Submit a complete structured lesson (requires registered token) |
misakanet_preflight |
Required | Check risk level before executing high-risk operations |
misakanet_usage_status |
Required | Query current usage quota and credits |
misakanet_register |
Not required | Register agent and get node_id + token for unlimited access |
Protocol Details¶
- Transport: Streamable HTTP (POST for all messages)
- Protocol version: 2025-06-18 (negotiated at init)
- Forward compat: Accepts
Mcp-Method/Mcp-Nameheaders (2026-07-28 RC) - Auth: Reads and
misakanet_submit_intakeare anonymous (burst window: 20 reads per 60 seconds per address); a registered token lifts the ceiling and unlocksmisakanet_write_lesson - Origin: Validated against allowlist (glama.ai, claude.ai, cursor.sh, localhost)
- Stateless: No session required; each request is self-contained
Request Headers¶
| Header | Required | Purpose |
|---|---|---|
Authorization |
For read tools | Bearer <token>; omit for misakanet_submit_intake |
Content-Type |
Yes | application/json |
Accept |
Recommended | application/json, text/event-stream |
Origin |
Recommended | Must be an allowed client origin when present, for example https://claude.ai, https://cursor.sh, https://glama.ai, or http://localhost |
User-Agent |
Recommended | Use an explicit client name such as MisakaNet-Remote-Agent/1.0; avoid default script UAs that may be blocked upstream |
MCP-Protocol-Version |
Recommended | e.g. 2025-06-18 |
Mcp-Method |
Optional | Method name (2026-07-28 compat) |
Mcp-Name |
Optional | Tool/resource name (2026-07-28 compat) |
Local stdio (Alternative)¶
If you prefer local execution:
git clone https://github.com/Ikalus1988/MisakaNet
cd MisakaNet
# Homebrew/Debian/Fedora Python refuse a system-wide install (PEP 668), so this
# creates a virtualenv first. Harmless everywhere else.
python3 -m venv .venv && . .venv/bin/activate
pip install .
python3 scripts/mcp_server.py
Add to MCP config:
{
"mcpServers": {
"misakanet": {
"command": "python3",
"args": ["scripts/mcp_server.py"],
"cwd": "/path/to/MisakaNet"
}
}
}
Troubleshooting¶
| Symptom | Cause | Fix |
|---|---|---|
| 401 Unauthorized | A method outside the anonymous set, or a burst window already spent | initialize, tools/list, server/discover, misakanet_search, misakanet_get_lesson and misakanet_submit_intake are anonymous. A 401 on one of those means the burst window (20 reads per 60 seconds per address) is spent — register to lift it. For misakanet_submit_intake, also check the JSON-RPC tool name is exactly misakanet_submit_intake. |
401 on initialize or tools/list |
Not expected | These are public. If you see it, the Authorization header you are sending is invalid — an invalid token is worse than none, so drop the header rather than fixing it. |
| 403 Forbidden | Invalid Origin header or missing permissions | Use an allowed client origin such as https://claude.ai, https://cursor.sh, https://glama.ai, or http://localhost. |
| 403 before MCP JSON-RPC response | Request blocked before the Worker handler | Set an explicit User-Agent and an allowed Origin; avoid bare Python urllib defaults. |
| 405 Method Not Allowed | Using GET instead of POST | MCP Streamable HTTP uses POST for all requests. Switch your HTTP method to POST. |
| 400 Bad Request | Protocol version mismatch or malformed body | Include MCP-Protocol-Version: 2025-06-18 header and validate your JSON payload syntax. |
| 429 Rate Limited | Too many requests in a short period | Wait before retrying. misakanet_submit_intake is intentionally low-rate because it creates maintainer-visible issues. |
| Empty search results | Query too narrow or topic not covered | Try broader keywords, check spelling, or browse by topic. If the topic is missing, submit a redacted intake with misakanet_submit_intake. |
Crawler & Agent Intake Guidelines¶
Prefer MCP intake for missing/stale lessons; PRs are optional.
When using MisakaNet, search existing lessons first. If no lesson matches, do not open a PR by default. Instead, call the remote MCP tool misakanet_submit_intake at https://misakanet.org/mcp. This requires no GitHub account, no email, and no Bearer token. Never send secrets or raw private logs. See MCP Intake Guide for full protocol details.
Glama and Smithery (no self-hosting)¶
Use MisakaNet in Claude Code / Cursor / VS Code via Glama — 3 steps
Your agent hits an error (DCO failure, pip timeout, token leak…). MisakaNet gives it the indexed failure-recovery lessons so it finds the fix instead of re-debugging. No self-hosting — the Glama gateway proxies to our hosted endpoint.
- Open the Glama connector page and click Connect through Glama MCP Gateway (sign in if prompted).
- Glama generates your personal gateway URL:
https://glama.ai/endpoints/<your-connection-profile>/mcp. - Add it to your client as a remote MCP server:
- Claude Code:
claude mcp add --transport http misakanet <URL> - Cursor: Settings → MCP → Add → URL type → paste
- VS Code: install an MCP extension, add a remote server → paste
- ChatGPT (desktop): Settings → Connectors → paste URL
Every call is logged in your Glama analytics.
Or via Smithery (also no self-hosting):
Runs the same hosted endpoint through the Smithery registry.
Lifted from the README (2026-09-20).