MCP^2(MCPSQ) is a simple MCP server to discover and manage MCP servers. See our website mcpsq.xyz for more information.
npm start
- Clone the repository:
git clone https://github.com/xinbenlv/mcpsq.git
cd mcpsq
- Install dependencies:
npm install
Start the MCP server locally:
# Production mode
npm start
# Development mode with auto-reload
npm run dev
# Build TypeScript to JavaScript
npm run build
The server will start on http://localhost:3000
and provide:
- SSE endpoint at
GET /mcp
- Message handling at
POST /messages
To use this MCP server with Cursor, add the following configuration to your Cursor MCP settings:
Create or edit ~/.cursor/mcp.json
:
{
"mcpServers": {
"mcpsq": {
"url": "http://localhost:3000/mcp"
}
}
}
Create .cursor/mcp.json
in your project root:
{
"mcpServers": {
"mcpsq": {
"url": "http://localhost:3000/mcp"
}
}
}
Once configured, the following tools will be available in Cursor:
-
find-mcp-server
: Search for MCP servers relevant to your query -
add-mcp-server-to-cursor
: Add an MCP server to your Cursor configuration -
list-current-mcp-servers
: List all currently configured MCP servers -
remove-mcp-server-from-cursor
: Remove an MCP server from your configuration
- Start the MCPSQ server locally
- Configure Cursor with the MCP settings above
- Restart Cursor or reload the MCP configuration
- In Cursor chat, try asking: "Find MCP servers for database management"
- The MCPSQ tools should appear in the available tools list
# Start the server in production mode
npm start
# Start the server in development mode with auto-reload
npm run dev
# Build TypeScript to JavaScript
npm run build
# Clean build directory
npm run clean
# Validate data files
npm run validate:data
# Type checking without emitting files
npm run typecheck
-
Development: Use
npm run dev
for development with automatic restart on file changes -
Type Checking: Run
npm run typecheck
to check for TypeScript errors without building -
Building: Use
npm run build
to compile TypeScript to JavaScript (automatically cleans first) -
Production: Use
npm start
to run the compiled TypeScript directly with tsx
- Server not starting: Check if port 3000 is available
- Cursor not connecting: Verify the MCP configuration file path and JSON syntax
- Tools not appearing: Check Cursor's MCP logs in the output panel
-
TypeScript errors: Run
npm run typecheck
to see detailed error messages
The data is stored in the data
directory.
Contributions are welcome! Please feel free to submit a pull request that updates the data in the data
directory.
- [x] handle env vars needed
- [ ] publish to npmjs.com
This project is licensed under the MIT License - see the LICENSE file for details.