Setup
MCP client configuration
Section titled “MCP client configuration”Add the server to your MCP client (e.g. Claude Desktop, Cursor, VS Code):
{ "mcpServers": { "mcp-general": { "command": "npx", "args": ["-y", "mcp-general"], "cwd": "/path/to/your/project" } }}Set cwd to the project that contains your config file. See Config Format for all supported formats.
Alternative: global install
Section titled “Alternative: global install”If you prefer not to use npx, install globally:
npm i -g mcp-generalThen use mcp-general directly:
{ "mcpServers": { "mcp-general": { "command": "mcp-general", "cwd": "/path/to/your/project" } }}Init tool
Section titled “Init tool”If no config file is found, the server exposes a single init tool. When called by an agent, it detects your project setup and creates:
Config file
Section titled “Config file”| Project has | Generated file |
|---|---|
tsconfig.json | mcp-general.config.ts |
package.json only | mcp-general.config.js |
| Neither | .mcp-generalrc.json |
Agent rules
Section titled “Agent rules”The init tool also creates instruction files that tell AI agents to use list_namespaces and list_actions for discovering available context:
| Agent | File |
|---|---|
| Amazon Q | .amazonq/rules/mcp-general.md |
| GitHub Copilot | .github/instructions/mcp-general.instructions.md |
| Cursor | .cursor/rules/mcp-general.mdc |
Existing rule files are not overwritten.
Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
MCPG_CONFIG_PATH | Override the config file path instead of auto-detecting via cosmiconfig |
Example:
{ "mcpServers": { "mcp-general": { "command": "npx", "args": ["-y", "mcp-general"], "env": { "MCPG_CONFIG_PATH": "/path/to/custom/mcp-general.config.ts" } } }}Local development
Section titled “Local development”To run from source:
git clone https://github.com/nmerget/mcp-general.gitcd mcp-generalpnpm installpnpm buildThen point your MCP client to the local build:
{ "mcpServers": { "mcp-general": { "command": "node", "args": ["/path/to/mcp-general/packages/server/dist/index.js"], "cwd": "/path/to/your/project" } }}