Skip to content
← All posts

Set up MCP in Claude Code, Cursor and other assistants

One command for Claude Code, one JSON block for everything else, and the five tools you get — three of which cost nothing to use.

Occult API4 min read

MCP — the Model Context Protocol — lets an AI assistant use a real tool instead of imagining one. Connected to the Occult API, your assistant can search 240-odd endpoints, read the exact request format for any of them, and make a real call, all without you pasting documentation into a chat window.

Setup takes about a minute per client. This page covers Claude Code, Claude Desktop, Cursor, and anything else that speaks MCP.

Before you start

You need two things: an API key from the dashboard (it looks like yt_live_...), and Node.js installed. The server itself does not need installing — npx fetches it the first time it runs.

Claude Code

One command. Paste it into your terminal with your own key:

claude mcp add occult-api -e OCCULT_API_KEY=yt_live_your_key_here -- npx -y occult-api-mcp

Keep it on one line. Split across lines with a backslash it works in bash and fails in PowerShell, which does not treat a backslash as a continuation — and most Windows users are in PowerShell.

Restart Claude Code afterwards, then ask it something like "check my Occult API account". If it reports a credit balance, you are connected.

Cursor

Cursor reads ~/.cursor/mcp.json. Create it if it is not there and add:

{
  "mcpServers": {
    "occult-api": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "occult-api-mcp"],
      "env": { "OCCULT_API_KEY": "yt_live_your_key_here" }
    }
  }
}

Restart Cursor. MCP servers read their environment once at startup, so a change without a restart does nothing.

Claude Desktop

Same JSON block, in claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\
  • macOS: ~/Library/Application Support/Claude/

If the file already has an mcpServers section, add occult-api inside it rather than replacing the section — otherwise you disconnect whatever was already there.

Other clients

Any MCP-compatible client takes the same block: command npx, args ["-y", "occult-api-mcp"], and OCCULT_API_KEY in the environment. Only the file location differs. Claude Code's own config lives at ~/.claude.json if you would rather edit it directly than use the command above.

What you get

Five tools. Three are free, which means an assistant can explore the whole API before it spends anything:

  • check_accountfree. Confirms the key works and reports your balance. Run this first when something is wrong: it separates a bad key from an empty balance.
  • search_endpointsfree. Finds a calculation by name or feature. "manglik" resolves even though no endpoint is called that, because it searches every named calculation.
  • describe_endpointfree. The exact request fields and a body proven against a live server.
  • call_endpoint1 credit. Runs any endpoint. Failed requests are not charged.
  • get_panchanga1 credit. A shortcut for the most common request.

Try it

Ask, in plain language:

What's the panchanga for Jaipur tomorrow at sunrise?

The assistant will find the endpoint, read its schema, and call it. You get a real tithi, yoga and karana back — not a plausible-looking invention.

Choghadiya timings returned through MCP

When it does not work

"claude" is not recognised as a command

The Claude Code command line is not installed, or not on your PATH. Use the JSON config instead; it does the same thing.

The assistant cannot see the tools

Restart the client. MCP servers are started once when the app launches, so a config edit has no effect until then.

Every call fails with an auth error

Ask the assistant to run check_account. It will tell you whether the key is rejected or the balance is empty — two problems that look identical from the outside and have completely different fixes.

It worked yesterday and not today

Check the balance first. Credits are prepaid and do not renew on their own.

A note on where your key lives

The key stays on your machine, in your client's config. It is sent to the API when a call is made and nowhere else. Treat that file the way you would treat any other credential — and if you are building something you intend to publish, read the section on key safety in the app guide before you ship it.

Next

With MCP connected, both build guides become much shorter: the website guide and the app guide. The full reference and the playground are there when you want to look something up yourself.

Build this yourself

Every endpoint mentioned here is in the reference, and you can send a real request from the browser before writing any code.