Cursor is an AI-powered code editor built on VS Code that brings intelligent coding assistance directly into your development workflow. With its built-in AI features and support for the Model Context Protocol (MCP), Cursor can interact with external tools and services.
When combined with Model Context Protocol (MCP) servers, Cursor becomes even more powerful. Using MCP servers, you can give Cursor access to your tools and infrastructure, allowing it to work with your APIs, databases, and other services.
This guide shows you how to connect Cursor to a Gram-hosted MCP server using Taskmaster, a full-stack CRUD application for task and project management. Taskmaster includes a web UI for managing projects and tasks, a built-in HTTP API, OAuth 2.0 authentication, and a Neon PostgreSQL database for storing data. Try the demo app to see it in action.
You’ll learn how to set up the connection, test it, and use natural language to manage tasks, projects, and workflows through Cursor.
Before connecting Cursor to a Taskmaster MCP server, you first need to create one. Follow our guide to creating a Taskmaster MCP server.
Once your Taskmaster MCP server is ready, there are two ways to connect it to Cursor:
Use the Gram CLI to open a browser-based installation flow (recommended).
Manually edit the Cursor MCP configuration file.
Connecting Cursor using the Gram CLI
The Gram CLI provides the simplest way to connect Cursor to a Gram-hosted MCP server. The CLI opens a browser-based installation flow that configures the connection automatically.
Replace your-taskmaster-slug with the actual slug from your Taskmaster MCP server configuration and your-gram-api-key with your Gram API key.
3. Test the connection
Open Cursor’s AI chat by clicking the chat icon or pressing Cmd/Ctrl + L. You can now ask questions like:
Create a new task called "Implement user authentication" with description "Add login and registration functionality to the app"
Troubleshooting
Here are some common issues and how to fix them.
Server not connecting
If Cursor can’t connect to the Gram server:
Verify the MCP server URL is correct in your configuration.
Check that the API behind the MCP server is reachable from your machine.
Ensure the npx command is available (reinstall Node.js if needed).
Try restarting Cursor after making configuration changes.
Authentication errors
If you’re using an authenticated server and getting authentication errors:
Verify your Gram API key in the dashboard under Settings -> API Keys.
Ensure the API key is correctly formatted with the Bearer prefix.
Check that the environment variables are properly set in your configuration.
Tools not appearing
If the tools aren’t showing up in Cursor:
Test the MCP server in the Gram Playground first to ensure it’s working.
Check that the toolset includes the tools you expect to use.
Verify the environment is correctly configured with the required variables.
Look for any error messages in Cursor’s output panel.
What’s next
Ready to build your own MCP server? Try Gram today and see how easy it is to turn any API into agent-ready tools that work across all your development environments.