agentleFS
synpulse8-opensourcesynpulse8-opensource/pulse8-ai-cortex-knowledge-vault/.cursor/skills/cortex-mcp/SKILL.md

cortex-mcp

Skill15 starsChanged 5 months agoApache-2.0View on GitHub

Cortex MCP server — vault_read, vault_write, vault_search, vault_feedback, and other tools. Use for MCP clients, Claude Desktop, Cursor MCP, streamable HTTP.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use MCP tools for agent workflows.

    line 53
  2. Very specific:

    Follow checklist in cortex-contributing: handler → http_server.py + server.py → tests → update reference + README.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cortex MCP

Transports

ModeHowConfig
HTTPhttp://localhost:8420/mcp/CORTEX_MCP_TRANSPORT=http, Docker or scripts/serve.py
stdioClaude Desktop subprocessCORTEX_MCP_TRANSPORT=stdio

HTTP uses FastMCP streamable HTTP (stateless_http=True, JSON responses).

Authentication

AUTH_METHODMCP behavior
noneOpen
apikeyx-api-key header must match API_KEY / CORTEX_API_KEY
oidcFastMCP OIDCProxy (browser login); API key fallback if configured

REST uses AuthMiddleware; MCP uses ApiKeyGuardMiddleware when apikey. See cortex-auth.

HTTP session flow

  1. POST /mcp/ — initialize (JSON-RPC 2.0)
  2. Save mcp-session-id response header if present
  3. notifications/initialized
  4. tools/call with name and arguments

Header: Accept: application/json, text/event-stream

Implementation map

LayerFile
Tool handlers (shared with REST logic)cortex/mcp/tools.py
HTTP tool registrationcortex/mcp/http_server.py
stdio servercortex/mcp/server.py
Mount on FastAPI appmount_mcp_on_app() in http_server.py

Handlers receive injected services: vault_path, graph, qmd, qmd_debounce, compiler.

Cursor integration

This project may register a local MCP server (e.g. user-cortex_local) pointing at http://localhost:8420/mcp/ with x-api-key when auth is enabled.

Use MCP tools for agent workflows; prefer vault_context for RAG-style retrieval.

Tool list

See reference.md for all 10 tools (including vault_resource_read), parameters, and return shapes.

MCP resources (cortex://resource/{id})

Token-heavy tool outputs can be opted into the server-side resource store via as_resource: true on vault_search / vault_context (and GET /api/v1/search?as_resource=true on REST). The store is in-memory, TTL-bounded, and LRU-capped; tune with CORTEX_RESOURCE_TTL_SECONDS and CORTEX_RESOURCE_MAX_ITEMS. See reference.md for details.

Adding a tool

Follow checklist in cortex-contributing: handler → http_server.py + server.py → tests → update reference + README.

Related skills

  • REST mirror: cortex-api
  • Deploy/local URL: cortex-deploy

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.