ysskrishna logoysskrishna

Chapter 7 of 9 · 3 min

Connect MCP servers to Cursor and Claude Code

The exact config for a local and a remote server in both hosts, how to test with the MCP Inspector, and how to debug a server that will not start.

This chapter wires up two servers: Markdown Convert MCP, a local stdio server run with npx, and the public ysskrishna MCP server over HTTP. The steps are the same for any server.

Claude Code

Local (stdio) server:

claude mcp add markdown-convert -- npx -y @ysskrishna/markdown-convert-mcp

Everything after -- is the command Claude Code runs. Add -s user (scope) to make it available in every project instead of just this one.

Remote (HTTP) server:

claude mcp add --transport http --scope user ysskrishna https://www.ysskrishna.space/mcp

Check:

claude mcp list

Then, inside a session, run /mcp to see each server's status and its tools.

Cursor

Cursor reads ~/.cursor/mcp.json (global) and .cursor/mcp.json (project). Both use an mcpServers object:

{
  "mcpServers": {
    "markdown-convert": {
      "command": "npx",
      "args": ["-y", "@ysskrishna/markdown-convert-mcp"]
    },
    "ysskrishna": {
      "url": "https://www.ysskrishna.space/mcp"
    }
  }
}

Save, then open Cursor Settings → MCP and make sure each server is enabled. A green status and a tool count mean it connected.

On Windows, some hosts need the command wrapped: "command": "cmd" with "args": ["/c", "npx", "-y", "@ysskrishna/markdown-convert-mcp"].

Step by step: connect, then prove it works

  1. Add Markdown Convert MCP with the config for your host.
  2. Restart the host or reload MCP servers.
  3. List tools: /mcp in Claude Code, or the MCP settings page in Cursor. You should see markdown_to_slack, markdown_to_teams, markdown_to_jira, markdown_to_plaintext.
  4. Ask the agent: "Convert this to Slack mrkdwn using the markdown-convert tool: Deploy finished. See logs."
  5. Approve the tool call when prompted. The result should use Slack's syntax: *Deploy* for bold and <https://example.com|logs> for the link.

Test a server without an agent

The MCP Inspector is a small web UI that connects to a server directly. Use it to see tools, call them with your own inputs and read raw responses:

npx @modelcontextprotocol/inspector npx -y @ysskrishna/markdown-convert-mcp

If a tool works in the Inspector but not in your host, the problem is host config or approvals, not the server.

When a server will not start

SymptomLikely causeFix
Status red, "command not found"npx or node not on the PATH the host seesUse the full path to npx, or launch the host from a shell where node -v works
Starts, zero toolsWrong package or argsRun the same command in a terminal; it should wait for input, not exit
Works in terminal, not in hostHost started before you installed Node, or a stale configRestart the host fully
Remote server 401/403Server needs auth headersAdd the headers your server documents to the config
Tools never calledVague request or too many tools enabledName the tool in your request; disable servers you do not need

Project or user scope?

  • Project (.cursor/mcp.json, or claude mcp add without a user scope): servers the whole team needs for this repo. Commit the file, but never commit secrets; use environment variables.
  • User: personal tools you want everywhere, such as a converter or a docs server.

Quick check

  1. In Claude Code, what does everything after -- in claude mcp add name -- … mean?It is the command (and arguments) Claude Code runs to start the stdio server.

  2. What is the top-level key in Cursor's mcp.json?mcpServers.

  3. A tool works in the MCP Inspector but your agent never calls it. Where is the problem?In the host: config, enable switch, approvals, or the request not matching the tool description. The server itself is fine.

Continue exploring

Productnpm+3Thinking Methods

Thinking Methods

17 well-known thinking methods your AI coding assistant can actually run.
Agent Skills
AI Apps & Assistants
Bash
Gemini
BlogCover image for 17 Thinking Skills for AI Agents: Pre-Mortem, Five Whys, Six Hats and More

17 Thinking Skills for AI Agents: Pre-Mortem, Five Whys, Six Hats and More

AI Apps & Assistants
Agent Skills
4 min read
ToolCover image for AI Token Counter

AI Token Counter

AI token counter with model pricing and context-window comparison in your browser.

Chat & AI
AI Apps & Assistants
+1
Productskills.sh+1Claude Code Subagents for Cursor

Claude Code Subagents for Cursor

Your Cursor subagents can finally run on the model you picked in each agent file.
Chat & AI
Agent Skills
AI Apps & Assistants
Bash
CourseCover image for Prompt Engineering for Coding Agents

Prompt Engineering for Coding Agents

Write prompts that coding agents act on: clear goals, the right context, output contracts, examples, structured thinking, shorter answers and a tiny eval set.

Agent Skills
Chat & AI

8 chapters · 21 min

BlogCover image for How to Install Caveman in Cursor and Claude Code

How to Install Caveman in Cursor and Claude Code

AI Apps & Assistants
Agent Skills
+1
3 min read