MCP Servers for Cursor IDE is a collection of Model-Context-Protocol servers that enhance Cursor IDE's capabilities by providing integrations with external services like PostgreSQL, Kubernetes, and PDF processing tools through a standardized communication protocol.
Clone the repository:
git clone https://github.com/yourusername/mcp-servers.git
cd mcp-servers
Install dependencies and set up the project:
npm run setup
This command installs all dependencies, builds the TypeScript project, and generates scripts for Cursor IDE integration.
Configure environment variables:
# Copy the example file
cp .env.example .env
# Edit the .env file with your credentials
nano .env
Example configuration in .env
:
# PostgreSQL Configuration
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=your_database_name
POSTGRES_USER=your_username
POSTGRES_PASSWORD=your_password
# POSTGRES_SSL_MODE=require # Uncomment if SSL is required
# Kubernetes Configuration
KUBECONFIG=/path/to/your/kubeconfig
# Alternative Kubernetes configuration:
# KUBE_API_URL=https://your-kubernetes-api-server
# KUBE_API_TOKEN=your-kubernetes-service-account-token
To connect your MCP server to Cursor IDE:
Run a specific server:
npm run server -- [server-name]
Examples:
# Run PostgreSQL server
npm run server -- postgres
# Run PDF server
npm run server -- pdf
# Run Kubernetes server
npm run server -- kubernetes
Start a specific server in development mode:
npm run dev -- [server-name]
Launch all available servers simultaneously:
npm run dev:all
View all servers that can be run:
npm run dev -- --list
Once your server is configured:
Tools:
mcp__get_database_info
- Retrieves database informationmcp__list_tables
- Lists all tables in the current schemamcp__get_table_structure
- Gets column definitions for a tablemcp__execute_query
- Executes a custom SQL queryTools:
get_pods
- Retrieves pods from a specified namespacefind_pods
- Finds pods matching a name patternkill_pod
- Deletes a pod in a namespaceexec_in_pod
- Executes a command in a podget_pod_logs
- Retrieves logs from a podTools:
read_pdf
- Extracts text and form field data from PDFswrite_pdf
- Creates or modifies PDFs with content and form field updatesBefore connecting to Cursor IDE, test your server:
Build the project:
npm run build
Run a specific server:
npm run start:postgres
Use the provided script for Cursor:
/path/to/mcp-servers/cursor-mcp-server.sh [server-name]
Examples:
# Run PostgreSQL server (default)
/path/to/mcp-servers/cursor-mcp-server.sh
# Run PDF server
/path/to/mcp-servers/cursor-mcp-server.sh pdf
# Run Kubernetes server
/path/to/mcp-servers/cursor-mcp-server.sh kubernetes
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "jira-server" '{"command":"node","args":["path/to/mcp-servers/dist/servers/jira-server/jira-server.js"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"jira-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/jira-server/jira-server.js"
]
},
"github-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/github-server/github-server.js"
]
},
"postgresql-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/postgresql-server/postgresql-server.js"
]
},
"kubernetes-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/kubernetes-server/kubernetes-server.js"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"jira-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/jira-server/jira-server.js"
]
},
"github-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/github-server/github-server.js"
]
},
"postgresql-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/postgresql-server/postgresql-server.js"
]
},
"kubernetes-server": {
"command": "node",
"args": [
"path/to/mcp-servers/dist/servers/kubernetes-server/kubernetes-server.js"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect