
ch sh mcp
一个为 Cursor 提供 cht.sh 集成的 MCP 服务器,快速获取编程语法与示例。
Repository Info
About This Server
一个为 Cursor 提供 cht.sh 集成的 MCP 服务器,快速获取编程语法与示例。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
cht.sh MCP Server for Cursor
A Model Context Protocol (MCP) server that integrates the powerful cht.sh cheat sheet service with Cursor. This allows AI agents and users to quickly fetch programming language syntax, commands, and examples directly within the Cursor editor.
NPX Usage
The simplest way to use this MCP server is with npx:
npx @travisjbeck/ch-sh-mcp
This command will start the MCP server, making it available for Cursor to connect.
Features
- Direct
cht.shQueries: Leverages the extensivecht.shdatabase for cheat sheets. - Flexible Querying: Supports multi-word queries (e.g., "python http server") and
cht.shspecific options. - AI Agent Focused: Designed to provide concise and relevant information for AI-assisted coding.
AI Agent Tool
query_cheatsheet: Fetches a cheat sheet fromcht.sh.- Parameters:
query(string, required): The search term or topic (e.g., "javascript array methods", "git commit").options(string, optional): Optionalcht.shquery parameters (e.g., "Tq" for terse output without comments, "Q" for quiet mode). Refer tocht.sh/:helpfor all options.
- Returns: The text content of the fetched cheat sheet.
- Parameters:
Setup in Cursor
- Open Cursor and go to
Settings > Cursor Settings > MCP. - Click
+ Add new global MCP server. - Fill in the fields:
- Name:
cht.sh Server(or any preferred name) - Type:
command - Command:
npx @travisjbeck/ch-sh-mcp
- Name:
- Click
Add. - Restart Cursor to ensure the new MCP server is recognized.
Manual Installation (Optional)
If you prefer to install the package globally:
npm install -g @travisjbeck/ch-sh-mcp
Then, in Cursor's MCP settings, set the command to simply @travisjbeck/ch-sh-mcp.
For Developers
Prerequisites
- Node.js (v18.0.0 or higher)
- npm
Installation from Source
git clone https://github.com/travisjbeck/ch-sh-mcp.git
cd ch-sh-mcp
npm install
Building
npm run build
This compiles the TypeScript source to JavaScript in the dist directory.
Running Locally for Development
npm run dev
This will start the server using ts-node for live reloading.
Testing
Manual testing with Cursor is recommended. Configure Cursor to use your local development server (e.g., node dist/index.js or the npm run dev command).
The server includes basic error handling and will output logs to stderr.
Project Structure
src/index.ts: The main MCP server implementation.package.json: Project metadata, dependencies, and scripts.tsconfig.json: TypeScript compiler configuration.
License
MIT - See LICENSE for details.
Quick Start
Clone the repository
git clone https://github.com/travisjbeck/ch-sh-mcpInstall dependencies
cd ch-sh-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.