Cursor Admin MCP Server

Cursor Admin MCP Server

An MCP server that provides AI assistants with team analytics capabilities for Cursor editor, allowing them to retrieve team member information, usage metrics, and spending data through natural language queries.

Category
访问服务器

README

Cursor Admin MCP Server

<div align="center">

<img src="assets/utlyze-logo.png" alt="Utlyze Logo" width="300">

by Utlyze.com

npm version npm downloads License: MIT Build Status Test Coverage

🎮 The Team Analytics Power-Up for Your AI Assistant

Brought to you by Utlyze - Zero Latency Operations Through AI Employees

</div>

🚀 Quick Install

npx -y cursor-admin-mcp

That's it. Your AI assistant just leveled up.

🎯 What You Get

Think of this as equipping your AI with X-ray vision for your development team:

  • 🏢 Team Roster - Instantly know who's on the team and their roles
  • 📊 Usage Analytics - See who's actually coding vs. who's in meetings
  • 💰 Credit Tracker - Know exactly where your AI credits are going
  • 📈 Productivity Metrics - Lines added, AI acceptance rates, favorite models
  • 🔍 Deep Insights - Which developer uses which tools, when they're most active

💪 Why This Matters

Stop asking your team for status updates. Your AI can now tell you:

  • "Who wrote the most code this week?"
  • "What's our AI spending trend?"
  • "Which team member has the highest AI acceptance rate?"
  • "Show me usage patterns for the last month"

📸 See It In Action

You: "Show me team usage for this week"

AI: Here's your team's activity for the last 7 days:

👥 TEAM MEMBERS
1. James Brady (Owner) - james@jamesbrady.org
2. Cody Vincent - vincent.cody298@gmail.com
3. 2 other members

📊 USAGE STATISTICS
• Most Active: Cody Vincent (641 AI requests)
• Most Productive: Cody Vincent (29,477 lines added)
• Top Models: claude-4-opus, gpt-4, claude-sonnet
• Active Days: 2/4 members coding daily

💰 SPENDING: $1,957.32 total
• James Brady: $1,848.57 (94.4%)
• Cody Vincent: $73.76 (3.8%)
• Others: $34.99 (1.8%)

Installation

Prerequisites

  • Node.js 16+
  • A Cursor team admin API key (get it from your team settings)

Install from npm

npm install -g cursor-admin-mcp

Install from source

git clone https://github.com/h3ro-dev/cursor-admin-mcp.git
cd cursor-admin-mcp
npm install
npm run build

Configuration

1. Set up your API key

Create a .env file in the project root (or set the environment variable):

CURSOR_API_KEY=key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Configure in Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "cursor-admin": {
      "command": "npx",
      "args": ["cursor-admin-mcp"],
      "env": {
        "CURSOR_API_KEY": "key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

3. Configure in Cursor

Add to your Cursor settings:

{
  "mcpServers": {
    "cursor-admin": {
      "command": "node",
      "args": ["/path/to/cursor-admin-mcp/dist/index.js"],
      "env": {
        "CURSOR_API_KEY": "key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Available Tools

1. get_team_members

Get a list of all team members with their information.

Example usage in Claude/Cursor:

"Show me all team members"
"List everyone on the team with their roles"

Returns:

[
  {
    "name": "John Doe",
    "email": "john@example.com",
    "role": "admin"
  },
  {
    "name": "Jane Smith",
    "email": "jane@example.com",
    "role": "member"
  }
]

2. get_daily_usage_data

Retrieve detailed usage metrics for a specified date range (max 90 days).

Parameters:

  • startDate: Start date in epoch milliseconds
  • endDate: End date in epoch milliseconds

Example usage in Claude/Cursor:

"Show me usage data for the last 7 days"
"What was our team's AI acceptance rate last month?"
"Which models did we use most this week?"

Returns:

[
  {
    "date": "2024-01-15",
    "linesAdded": 1523,
    "linesDeleted": 342,
    "acceptanceRate": 0.82,
    "requestTypes": {
      "completion": 234,
      "chat": 56,
      "edit": 23
    },
    "mostUsedModels": ["gpt-4", "claude-3"],
    "mostUsedExtensions": ["copilot", "cursor-tab"],
    "clientVersion": "0.42.0"
  }
]

3. get_spending_data

Get team spending information with optional filtering and pagination.

Optional Parameters:

  • searchTerm: Filter by search term
  • sortBy: Field to sort by
  • sortDirection: "asc" or "desc"
  • page: Page number
  • pageSize: Items per page

Example usage in Claude/Cursor:

"Show me team spending"
"Who are the top spenders this month?"
"Search for John's spending data"

Returns:

{
  "members": [
    {
      "email": "john@example.com",
      "name": "John Doe",
      "spending": 125.50
    }
  ],
  "total": 1250.00,
  "page": 1,
  "pageSize": 10
}

Development

Setup

# Clone the repository
git clone https://github.com/h3ro-dev/cursor-admin-mcp.git
cd cursor-admin-mcp

# Install dependencies
npm install

# Copy environment file
cp .env.example .env
# Edit .env and add your CURSOR_API_KEY

# Run in development mode
npm run dev

Testing

# Run tests
npm test

# Run tests with coverage
npm test -- --coverage

# Run tests in watch mode
npm run test:watch

Building

# Build the project
npm run build

# Run the built version
npm start

Project Structure

cursor-admin-mcp/
├── src/
│   ├── index.ts          # MCP server implementation
│   └── cursor-client.ts  # Cursor API client
├── tests/
│   └── cursor-client.test.ts  # Test suite
├── examples/
│   └── (example scripts)
├── docs/
│   └── (additional documentation)
├── package.json
├── tsconfig.json
├── jest.config.js
├── .env.example
├── .gitignore
└── README.md

Examples

Basic Usage

// The MCP server handles all the communication
// Just use natural language in Claude/Cursor:

"Show me all team members and their roles"
"Get usage data for January 2024"
"What's our team's total spending this month?"
"Show me the AI acceptance rate trend for the last 30 days"

Advanced Queries

// Complex date ranges
"Compare usage between last week and this week"

// Specific metrics
"Which team members have the highest AI suggestion acceptance rate?"

// Spending analysis
"Show me spending sorted by amount for team members whose name contains 'John'"

Error Handling

The server includes comprehensive error handling:

  • Invalid API Key: Clear error message if authentication fails
  • Rate Limiting: Respects Cursor API rate limits
  • Date Validation: Ensures date ranges don't exceed 90 days
  • Network Errors: Graceful handling of connection issues
  • Invalid Parameters: Detailed validation messages

Security

  • API keys are never logged or exposed
  • All communication uses HTTPS
  • Basic authentication as per Cursor API requirements
  • Environment variables for sensitive data

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Write tests for new features
  • Update documentation
  • Follow TypeScript best practices
  • Ensure all tests pass
  • Add examples for new functionality

Troubleshooting

API Key Issues

If you get authentication errors:

  1. Verify your API key starts with key_
  2. Ensure you're a team admin
  3. Check the key hasn't been revoked

Connection Issues

If the server won't connect:

  1. Check your internet connection
  2. Verify the Cursor API is accessible
  3. Check for any firewall restrictions

Date Range Errors

If you get date range errors:

  1. Ensure your date range is within 90 days
  2. Use epoch milliseconds for dates
  3. Verify endDate > startDate

License

MIT License - see LICENSE file for details

Acknowledgments

Support


<div align="center">

Built by Utlyze

Utlyze - Zero Latency Operations Through AI Employees

We're pioneering the future of work by creating AI employees that seamlessly integrate with your existing workflows. The Cursor Admin MCP Server is just one example of how we're making teams more efficient through intelligent automation.

Visit Utlyze.com | Contact Us | LinkedIn

Made with ❤️ by the Utlyze team for the Cursor community

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选