mcp-client
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Call tools on a remote MCP (Model Context Protocol) server over streamable HTTP. Use whenever a connector is an MCP server (e.g. the “MCP server” connector type), or the user asks to list or invoke an MCP server’s tools, prompts, or resources.
- Sends data out
3 other projects use a version of this.
Adopted by
Most recently taken up by
- harryleemedia/second-braintheir own version, first seen Mar 17, 2026
- walidboulanouar/Ay-Skillstheir own version, first seen Mar 10, 2026
- coleam00/second-brain-skillstheir own version, first seen Jan 24, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- coleam00/second-brain-skills★ 832same name
- walidboulanouar/Ay-Skills★ 91same name
- harryleemedia/second-brain★ 16same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- building-agentsSkill
- building-workflowsSkill
- claude-apiSkill
- cross-tool-researchSkill
- daily-briefingSkill
- dashboard-designSkill
- frontend-designSkill
- internal-commsSkill
- mcp-builderSkill
- skill-creatorSkill
- status-updateSkill
- tines-casesSkill
- tines-export-to-3bSkill
- webapp-testingSkill
- workflow-discoverySkill
- workflow-operationsSkill
- workflow-reviewSkill
- workflow-volume-designSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Every request is a POST to the server URL with Content-Type: application/json and Accept: application/json, text/event-stream.
- Very specific: line 62
If the response carries an Mcp-Session-Id header, echo it on every subsequent request (the helper above does this).
- Distinctive: line 64
When finished, send a DELETE to the endpoint with the session header if the server supports it.
- Very specific: line 100
Prefer one short-lived session per task.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Using a remote MCP server
An MCP server is a JSON-RPC 2.0 API behind a single HTTP endpoint. Talk to it with plain fetch from execute or a step, with the MCP connector attached — the platform injects authentication on matching requests, so never set Authorization headers yourself, and never print or store tokens. A 401 or 403 means the connector needs to be reconnected by the user; tell them so rather than attempting an auth flow yourself.
Request basics
Every request is a POST to the server URL with Content-Type: application/json and Accept: application/json, text/event-stream. The response is either plain JSON or an SSE stream; for SSE, parse each data: line as JSON and take the message whose id matches your request. This helper handles both:
let sessionId: string | undefined;
async function mcp(
url: string,
method: string,
params?: Record<string, unknown>,
id?: number
) {
const res = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json, text/event-stream",
...(sessionId ? { "Mcp-Session-Id": sessionId } : {}),
},
body: JSON.stringify({
jsonrpc: "2.0",
method,
...(params ? { params } : {}),
...(id !== undefined ? { id } : {}),
}),
});
sessionId = res.headers.get("Mcp-Session-Id") ?? sessionId;
const text = await res.text();
if (!res.ok)
throw new Error(`${method}: HTTP ${res.status}: ${text.slice(0, 500)}`);
if (id === undefined) return; // notification, no response expected
const messages = res.headers
.get("Content-Type")
?.includes("text/event-stream")
? text
.split("\n")
.filter((line) => line.startsWith("data:"))
.map((line) => JSON.parse(line.slice(5)))
: [JSON.parse(text)];
const reply = messages.find((m) => m.id === id);
if (!reply) throw new Error(`${method}: no response with id ${id}`);
if (reply.error) throw new Error(`${method}: ${JSON.stringify(reply.error)}`);
return reply.result;
}Session lifecycle
- Send
initializewithprotocolVersion: "2025-06-18",capabilities: {}, and yourclientInfo. If the server rejects the protocol version, retry with the version it offers in the error. - If the response carries an
Mcp-Session-Idheader, echo it on every subsequent request (the helper above does this). - Send a
notifications/initializednotification (noid). - When finished, send a DELETE to the endpoint with the session header if the server supports it; ignore a 405.
await mcp(
SERVER_URL,
"initialize",
{
protocolVersion: "2025-06-18",
capabilities: {},
clientInfo: { name: "3B", version: "1.0" },
},
1
);
await mcp(SERVER_URL, "notifications/initialized");Tools, prompts, and resources
tools/listreturns tool names, descriptions, and JSON Schema inputs. Page withcursorif the result hasnextCursor. Cache the list in a file instead of re-fetching every turn.tools/calltakes{ name, arguments }. The result hascontentblocks (usually{ type: "text", text }); checkisErrorbefore trusting the output.prompts/list,prompts/get,resources/list, andresources/readfollow the same request shape.
const { tools } = await mcp(SERVER_URL, "tools/list", {}, 2);
const result = await mcp(
SERVER_URL,
"tools/call",
{
name: "some_tool",
arguments: { query: "example" },
},
3
);
if (result.isError) throw new Error(result.content?.[0]?.text);Prefer one short-lived session per task. If a long-running call streams progress notifications over SSE, ignore messages without your request id — only the matching response carries the result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

