How vimarsh244/tally-mcp-server works
Tally Prime MCP Server exposes Tally ERP data and operations to MCP clients. A client connects through local stdio or the HTTP transport; the server registers read and optional write tools, which query or update Tally through its XML interface. Reporting results can be cached for later SQL queries. The HTTP deployment additionally supports OAuth, per-profile realms and an administration API. The map follows documented capabilities and indexed imports; unsampled module internals are represented only where their role is documented.
Main entry points: tools/index.mts Tool registry · tally/index.mts Tally operations · app.mts HTTP app · client.mts XML transport
Components 30
Entry and HTTP
- Server entry
src/index.mts - Web server
src/server.mts - HTTP app
src/http/app.mts - MCP HTTP route
src/http/mcp-route.mts - OAuth routes
src/http/oauth.mts - Setup API
src/http/admin.mts
MCP tools
- MCP server
src/mcp.mts - Tool registry
src/tools/index.mts - Metadata tools
src/tools/metadata.mts - SQL query tools
src/tools/query.mts - Statement tools
src/tools/statements.mts - Ledger tools
src/tools/ledgers.mts - Inventory tools
src/tools/inventory.mts - Voucher tools
src/tools/vouchers.mts - Context tools
src/tools/context.mts - Master write tools
src/tools/write.mts - Voucher write tools
src/tools/voucher-write.mts - Tool helpers
src/tools/shared.mts
Tally integration
- Tally operations
src/tally/index.mts - XML transport
src/tally/client.mts - XML templates
src/templates.mts - Data definitions
src/definition.mts
Runtime state
- Auth store
src/http/store.mts - Realm resolver
src/http/realm.mts - Profile registry
src/profiles.mts - Tally target
src/tally-target.mts - Result cache
src/database.mts - Configuration
src/config.mts
Other components
- MCP client
- Tally Prime
Connections 43
- MCP client → Server entry: starts local
README.md - MCP client → HTTP app: connects over HTTP
README.md - Server entry → MCP server: starts
src/index.mts - Web server → HTTP app: creates
src/server.mts - HTTP app → MCP HTTP route: registers
src/http/app.mts - HTTP app → OAuth routes: registers
src/http/app.mts - HTTP app → Realm resolver: creates resolver
src/http/app.mts - HTTP app → Setup API: registers
src/http/app.mts - OAuth routes → Auth store: uses
src/http/oauth.mts - MCP HTTP route → MCP server: serves
src/http/mcp-route.mts - MCP HTTP route → Realm resolver: resolves realm
src/http/mcp-route.mts - Realm resolver → Profile registry: looks up
src/http/realm.mts - Realm resolver → Tally target: selects target
src/http/realm.mts - Setup API → Profile registry: manages
src/http/admin.mts - Setup API → Tally operations: checks Tally
src/http/admin.mts - MCP server → Tool registry: registers tools
src/mcp.mts - Tool registry → Metadata tools: registers
src/tools/index.mts - Tool registry → SQL query tools: registers
src/tools/index.mts - Tool registry → Statement tools: registers
src/tools/index.mts - Tool registry → Ledger tools: registers
src/tools/index.mts - Tool registry → Inventory tools: registers
src/tools/index.mts - Tool registry → Voucher tools: registers
src/tools/index.mts - Tool registry → Context tools: registers
src/tools/index.mts - Tool registry → Master write tools: registers optionally
src/tools/index.mts - Tool registry → Voucher write tools: registers optionally
src/tools/index.mts - Tool registry → Result cache: creates cache
src/tools/index.mts - Tool helpers → Result cache: caches results
src/tools/shared.mts - Metadata tools → Data definitions: reads definitions
src/tools/metadata.mts - SQL query tools → Tally operations: queries Tally
src/tools/query.mts - SQL query tools → Result cache: queries cache
src/tools/query.mts - Statement tools → Tally operations: fetches reports
src/tools/statements.mts - Ledger tools → Tally operations: queries Tally
src/tools/ledgers.mts - Inventory tools → Tally operations: queries Tally
src/tools/inventory.mts - Voucher tools → Tally operations: queries Tally
src/tools/vouchers.mts - Context tools → Tally operations: queries Tally
src/tools/context.mts - Master write tools → Tally operations: writes masters
src/tools/write.mts - Voucher write tools → Tally operations: writes vouchers
src/tools/voucher-write.mts - Tally operations → XML transport: uses transport
src/tally/index.mts - XML transport → XML templates: renders XML
src/tally/client.mts - XML transport → Tally target: reads target
src/tally/client.mts - XML transport → Tally Prime: posts XML
README.md - Tally operations → Data definitions: uses definitions
- Tool registry → Configuration: reads settings
src/tools/index.mts