Draft
Connect a Local MCP Server to Cursor and Use It to Finish a Real Repo Task
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.
Related
Other tutorials in Integrate.
Add a Second Frontier Model to Claude Code with a Documented Fallback Path
Configure a second model and complete the same task via the fallback after a simulated failure.
Not yet verified
1 min read
Build a TypeScript MCP Server for a Real API, Test It with Inspector, and Call It from Claude Code
Implement the server, pass Inspector, then call it from Claude Code to finish a real API task.
Not yet verified
1 min read
Call Qwen4-Max Through the OpenAI-Compatible API and Finish a Tool-Calling Task
Call qwen4-max from the OpenAI SDK on Alibaba Cloud Model Studio in Beijing by changing only api_key, base_url, and model, stay on that model's official free quota with 免费额度用完即停 / Free Quota Only turned on, then finish a tool-calling job: a checked dependency report for an npm project.
Not yet verified
15 min read
Call the Official Hosted Qwen3.8-27B API on Alibaba Model Studio
Call the official hosted qwen3.8-27b API on Alibaba Cloud Model Studio in Beijing, stay on that model's own free quota with 免费额度用完即停 / Free Quota Only turned on, and extract five fields from a fixed pytest failure into JSON that a local checker can verify.
Not yet verified
15 min read