mcp-client

Guides writing Python and Node clients that call AiRaccoon's MCP server over SSE transport.

2|Updated Aug 2, 2026
One-click install
npx skills add https://github.com/Arasz/ai-raccoon --skill mcp-client-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-client
Source: https://github.com/Arasz/ai-raccoon/tree/main/.ai-badger/skills/learned/uncategorized/ai-raccoon-mcp-client
Command: npx skills add https://github.com/Arasz/ai-raccoon --skill mcp-client-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, mcp, and includes references (resource) components.

What problem does it solve? Writing scripts that call AiRaccoon's MCP server fails in non-obvious ways: the HTTP transport returns SSE instead of plain JSON, memory_write has no path parameter, passing context silently hides entries from search, and the ONNX embedding model is missing from build output. This Skill documents every verified pitfall and the correct client patterns. ## Core Features & Use Cases - SSE Response Parsing: Correctly parse Server-Sent Events responses and unwrap the double-nested JSON-RPC result instead of calling resp.json() directly. - Hash Pre-computation: Reproduce AiRaccoon's SHA256 path and content-hash formulas to verify written entries against search results. - Scope and Access Pitfalls: Avoid the context parameter that sets scope='custom' (invisible to memory_stats and project-scoped search) and handle the full access mode required by memory_delete_context. - Use Case: You are writing a Python ingestion script that writes documentation chunks into AiRaccoon memory and verifies them via memory_search; this Skill gives you the working client pattern and the five known failure modes with fixes. ## Quick Start Read this Skill before writing any Python, Node, or curl code that calls the AiRaccoon MCP endpoint at http://localhost:5000/mcp.

Frequently Asked Questions about mcp-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse SSE responses from an MCP server in Python?

MCP Streamable HTTP returns Server-Sent Events, so resp.json() fails. Split the response text on lines, extract the line starting with "data: ", parse it as JSON, then json.loads the nested result.content[0].text string to get the actual tool result.

Why does memory_stats return zero entries after successful memory_write calls?

Passing the context parameter to memory_write sets scope='custom', and memory_stats only counts rows where scope='project'. Omit the context parameter and embed provenance metadata directly in the content string instead.

Should I use the official mcp Python SDK or hand-rolled httpx for MCP clients?

Use the official mcp SDK when it is installed in your environment; note that stdio_client yields a 2-tuple while streamable_http_client yields a 3-tuple. Hand-rolled httpx works but requires manual SSE parsing and double JSON unwrapping.

Why does memory_embed_pending process zero entries?

The ONNX embedding model file is not copied to the build output by the .csproj, so embedding silently fails. Copy model_qint8_arm64.onnx into the bin output Models directory or set the AIRACCOON_EMBEDDING_MODEL environment variable.

Why does memory_delete_context return an access-denied error?

memory_delete_context requires Destructive access, but the default project access mode is rw. Set the project to full mode before deleting, or stop the server and delete the memory.db file directly during development.