Draft

Connect a Local MCP Server to Cursor and Use It to Finish a Real Repo Task

  • Not yet verified
  • Versions not pinned
  • 1 min read

Task

What you will complete

Start a local MCP server, connect it in Cursor, and complete a repo task that requires that tool.

Success criteria

  • Cursor lists the server's tools while the server process is running.
  • The repository task is finished with a call to that server's tool, and the diff shows it.
  • The evidence section can be filled with the command output, the tool call, and the repo state.

What this is not

Not a tour of the MCP specification, and not a directory of hosted servers.

Prerequisites

  • Cursor, and a project you are allowed to modify.
  • A local MCP server you can start from a terminal, or the time to write a tiny one with a single tool.
  • A repository task that cannot be finished honestly without that tool.

Environment

Not recorded. A verified revision will list the operating system, the tool builds, and the model identifiers that were present for the run.

1. Name the repository task

Pick a change in a repository you can modify that you cannot finish honestly without the tool the server will expose. Write the task in one sentence, and name the file or behavior that should be different when it is done. The verified page will name the repository. This draft does not.

2. Start the MCP server on your machine

Run the server from a terminal and leave that process up. Note the command, the working directory, and the port or socket it listens on. Those notes are what the evidence section will quote. They are not filled in here.

Planned command shape. Not a transcript.

# Replace this with the command that actually starts the server.
local-mcp-server

3. Connect the server in Cursor

Add the running server to the project’s Cursor MCP configuration and reload until its tools are listed. The block below is a placeholder for the kind of file the verified page will paste. It is not a config from a run, and it is not a claim about Cursor’s current schema.

{
  "mcpServers": {
    "local-tool": {
      "command": "local-mcp-server",
      "args": []
    }
  }
}

4. Finish the task with that tool

Ask Cursor to do the task you named, and require the new tool. Keep the diff and a record of the tool call. If the agent finishes without calling the tool, the task is not done.

5. Save what the evidence section needs

Keep the server command and its output, the Cursor config you actually used, the tool call, and a link to the repository state. Those replace the empty evidence section on this page.

Evidence it actually ran

This is the shape of the stamp. It has not been earned, and the example date that follows is a placeholder, not a run: Ran on YYYY-MM-DD (Asia/Shanghai) with the pinned versions.

Command output
None recorded. A verified revision will quote the output from the run, not a sample written in advance.
Tests, CI, or Inspector
Not run for this draft.
Repository or config
No link recorded.

Failure modes

Anticipated only. None of these has been checked against a run of this tutorial.

  • Unchecked

    The server process exits before Cursor connects

    The agent surface may show a dead server while the terminal that started it has already returned.

  • Unchecked

    Cursor is reading a different config file

    The tools list stays empty because the file you edited is not the one this project loads.

  • Unchecked

    The agent finishes the task without the new tool

    The diff can look done while the server was never called. That does not meet the success criteria.

Other tutorials in Integrate.