my-mcp-2
by vmridulmcpfy
README.md
# my-mcp-2
Self-hosted MCP server generated by [MCPfy](https://mcpfy.ai) using [`mcpfy-sdk`](https://www.npmjs.com/package/mcpfy-sdk).
Includes **2** tool(s) and **0** prompt(s) exported from your MCPfy server.
## Setup
```bash
npm install # required before npm run dev (installs tsx + mcpfy-sdk)
cp .env.example .env # optional fallback credentials for local/stdio
npm run dev # default transport: http
```
### Upstream API auth
Same model as hosted MCPfy: pass `Authorization`, `x-api-key`, or `x-auth-token` on the **MCP HTTP** connection; tools forward those headers to your API.
Env vars in `.env` are only a fallback when the MCP request has no auth headers (e.g. stdio).
- `npm run dev:http` — HTTP on :3000 (override with `--port 4000` or `PORT=4000`)
- `npm run dev:stdio` — stdio (Claude Desktop / Cursor local)
## Cursor / Claude Desktop (stdio)
```json
{
"mcpServers": {
"my-mcp-2": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/src/server.ts", "--stdio"]
}
}
}
```
## Learn more
- [mcpfy-sdk docs](https://www.npmjs.com/package/mcpfy-sdk)
- Scaffold your own: `npx create-mcpfy-app@latest`