- Home
- MCP servers
- Trace
Trace
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
4 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mnehmos-mnehmos.trace.mcp": {
"command": "node",
"args": [
"/path/to/trace-mcp/dist/index.js"
]
}
}
}You can use the MCP static analysis engine to detect schema mismatches between producers and consumers, ensuring that data shapes and tool outputs stay in sync before runtime. It helps you spot differences between backend responses, tool outputs, and client usage, so you catch contract issues early and avoid runtime errors.
How to use
You use the MCP server by running it as a local process and then connecting an MCP client to it. The server exposes tools that analyze producer schemas, trace how consumers use those tools, and compare the results to surface mismatches. Typical tasks include extracting producer schemas from server code, tracing consumer usage in client code, and generating reports or scaffolded code to fix any gaps.
How to install
Prerequisites: Node.js and npm installed on your development machine.
Clone the MCP server repository, install dependencies, and build the project to produce a runnable server executable.
Configuration
{
"mcpServers": {
"trace-mcp": {
"command": "node",
"args": ["/path/to/trace-mcp/dist/index.js"],
"env": {}
}
}
}
Examples and workflows
Quick one-off analysis: compare backend producer schemas with frontend consumer usage and generate a Markdown report. Continuous validation: initialize a trace project, start a watcher, and periodically poll for validation results. Generate missing client or server scaffolding from existing usage to keep both sides in sync.
Notes
This engine is designed to reveal contract mismatches before they cause runtime errors. Use it as part of your development workflow to enforce stable data contracts across services and client code.
Available tools
extract_schemas
Extract MCP tool definitions from server source code by scanning for server.tool() calls and parsing their Zod schemas.
extract_file
Extract MCP tool definitions from a single TypeScript file.
trace_usage
Trace how client code uses MCP tools, identifying callTool invocations and accessed properties on results.
trace_file
Trace MCP tool usage within a single TypeScript file.
compare
Run the full pipeline: extract producer schemas, trace consumer usage, and compare them to surface mismatches.
scaffold_consumer
Generate client code from a producer schema to correctly call MCP tools.
scaffold_producer
Generate producer schema stubs from consumer usage to define MCP tools.
comment_contract
Add cross-reference comments documenting validated producer/consumer pairs in both files.
init_project
Initialize a trace project with a .trace-mcp config directory for watch mode and caching.
watch
Watch project files for changes and auto-revalidate contracts.
get_project_status
Get the status of a trace project including config, cache state, and last validation result.