Installation
Configuration
Claude Desktop
Add to~/.claude.json:
Cursor
Add to Cursor Settings → Tools & MCP →mcp.json:
Windsurf
- Open Windsurf Settings
- Navigate to Cascade → MCP
- Click Add Server
- Enter:
- Name:
cas_parser_node_mcp - Type:
command - Command:
npx -y cas-parser-node-mcp@latest - Environment:
CAS_PARSER_API_KEY=your-api-key
- Name:
VS Code
Add to your VS Code MCP settings:Remote Server (Streamable HTTP)
If you prefer not to install the npm package locally:Available Tools
The MCP server exposes all CAS Parser API endpoints as tools:| Tool | Description |
|---|---|
smart_parse | Auto-detect CAS type and parse PDF |
cdsl_parse | Parse CDSL eCAS |
nsdl_parse | Parse NSDL eCAS |
cams_kfintech_parse | Parse CAMS/KFintech CAS |
contract_note_parse | Parse broker contract notes |
kfintech_generate | Request CAS via KFintech email |
cdsl_fetch | CDSL OTP request (Step 1) |
cdsl_fetch_verify | CDSL OTP verify (Step 2) |
inbox_connect | Get Gmail OAuth URL |
inbox_cas | List/parse CAS from inbox |
inbox_disconnect | Revoke email access |
credits | Check remaining credits |
token_generate | Generate access token |
Code Mode
The MCP server includes Code Mode — agents can write TypeScript SDK code that runs in a sandboxed environment:Doc Search Tool
The server includes a documentation search tool that lets agents query CAS Parser docs:Example Prompts
Once configured, you can ask your AI agent:- “Parse this CAS PDF and show me my portfolio summary”
- “What are my top holdings by value?”
- “Check my CAS Parser credit balance”
- “Import my latest CAS from Gmail”
- “Fetch my CDSL holdings using OTP”
Sandbox Testing
Use the sandbox API key for testing:Troubleshooting
| Issue | Solution |
|---|---|
| ”API key invalid” | Check CAS_PARSER_API_KEY env var |
| ”Tool not found” | Restart your IDE after config change |
| ”Connection refused” | Ensure npx can access npm registry |
| ”Timeout” | Parsing takes ~30-60s; increase timeout |

