How ranjith-kumar-kuruba/sf-field-doc-mcp works
This is a local MCP server for drafting and saving Salesforce custom-field documentation. An assistant calls the proposal tool, which reads a field XML file and derives bounded description and help-text drafts from its label, type, and supplied purpose. The assistant presents the draft for developer review; after the developer’s choices, it calls the save tool, which updates selected XML tags in place. Both tools, their handlers, and the stdio bootstrap are implemented in src/index.ts; the README documents the review loop. The map reflects the shown single-file implementation rather than assuming separate internal services.
Main entry points: index.ts MCP Server
Components 10
MCP Interface
- MCP Server
src/index.ts - Stdio Transport
src/index.ts - Tool Catalog
src/index.ts
Drafting
- Proposal Handler
src/index.ts - Draft Generation
src/index.ts
Metadata Updates
- Field XML Files
- Save Handler
src/index.ts - XML Tag Upsert
src/index.ts
Other components
- Developer
- AI Assistant
Connections 12
- MCP Server → Stdio Transport: connects
src/index.ts - MCP Server → Tool Catalog: registers
src/index.ts - AI Assistant → MCP Server: calls tools
README.md - MCP Server → Proposal Handler: dispatches
src/index.ts - Proposal Handler → Draft Generation: generates draft
src/index.ts - Draft Generation → Field XML Files: reads
src/index.ts - Proposal Handler → AI Assistant: returns draft
src/index.ts - AI Assistant → Developer: requests review
README.md - Developer → AI Assistant: provides choices
README.md - MCP Server → Save Handler: dispatches
src/index.ts - Save Handler → XML Tag Upsert: updates tags
src/index.ts - Save Handler → Field XML Files: writes
src/index.ts