mcpserve-ts
Provides tools for interacting with a local Git repository, including checking working tree status, viewing staged or unstaged diffs, inspecting commit history, and viewing line-by-line blame information.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcpserve-ts
A Model Context Protocol (MCP) server in TypeScript — hand-rolled JSON-RPC 2.0 over stdio. Exposes Git repository tools and project resource browsing for AI assistants like Claude.
Features
Hand-rolled MCP protocol — JSON-RPC 2.0 over stdio, no SDK dependency
8 tools — Git operations, project browsing, safe shell execution
3 resource types — File contents, package.json, directory tree
Path sandboxing — all file operations confined to project root
Zod validation — strict input validation on every tool call
TypeScript strict — zero
anytypes, full type safetyMinimal dependencies — only
zodat runtime
Related MCP server: github-mcp
Quick Start
# Install
git clone https://github.com/devaloi/mcpserve-ts.git
cd mcpserve-ts
npm install
npm run build
# Run
PROJECT_ROOT=/path/to/your/project node dist/index.js
# Test
npm testClaude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcpserve-ts": {
"command": "node",
"args": ["/path/to/mcpserve-ts/dist/index.js"],
"env": {
"PROJECT_ROOT": "/path/to/your/project"
}
}
}
}Tools
Tool | Description | Parameters |
| Show working tree status |
|
| Show staged or unstaged changes |
|
| Show commit history |
|
| Show line-by-line authorship |
|
| List directory structure |
|
| Read file contents |
|
| Search with regex |
|
| Execute allowlisted commands |
|
Shell Allowlist
Only these commands are permitted via run_command:
ls, cat, wc, head, tail, find, grep
Resources
URI | Description | MIME Type |
| Project file contents | auto-detected |
| Parsed package.json | application/json |
| Directory tree | text/plain |
Architecture
src/
├── index.ts # Entry point: register tools, start stdio
├── server.ts # MCP server: method dispatch
├── protocol.ts # JSON-RPC 2.0 types and codec
├── transport.ts # Stdio transport (line-delimited JSON)
├── config.ts # Zod-validated env config
├── tools/
│ ├── registry.ts # Tool registry (name → handler + schema)
│ ├── git.ts # Git tools: status, diff, log, blame
│ ├── project.ts # Project tools: tree, read, search
│ └── shell.ts # Safe shell: allowlisted commands only
├── resources/
│ ├── provider.ts # Resource provider interface
│ ├── project.ts # File resources (file:///path)
│ └── package.ts # package.json + tree resources
├── lib/
│ ├── constants.ts # Shared constants (limits, skip dirs)
│ ├── git.ts # Git CLI wrapper (execFile)
│ ├── sandbox.ts # Path sandboxing
│ ├── schemas.ts # Zod schemas for tool inputs
│ └── tree.ts # Shared directory tree builderMCP Protocol
Implements the Model Context Protocol specification:
Transport: JSON-RPC 2.0 over stdio (newline-delimited JSON)
Protocol version:
2024-11-05Methods:
initialize,ping,tools/list,tools/call,resources/list,resources/readNotifications:
notifications/initialized
Example Handshake
# Initialize
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1.0"}}}' | node dist/index.jsConfiguration
Variable | Default | Description |
|
| Root directory for file operations |
|
| Log level: debug, info, warn, error |
Logs are written to stderr; stdout is reserved for JSON-RPC messages.
Development
npm run build # Compile TypeScript
npm run dev # Watch mode
npm run test # Run tests (Vitest)
npm run typecheck # Type-check without emitting
npm run lint # ESLint
make all # lint + typecheck + build + testTech Stack
Component | Choice |
Runtime | Node.js 20+ |
Language | TypeScript 5 (strict) |
Protocol | Hand-rolled JSON-RPC 2.0 |
Validation | Zod |
Testing | Vitest |
Linting | ESLint + typescript-eslint |
License
MIT
Contributing
See CONTRIBUTING.md. PRs welcome — run npm test && npm run lint before submitting.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides remote filesystem operations, git repository management, and process execution capabilities for AI agents through the Model Context Protocol.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with GitHub repositories, issues, pull requests, and content via the Model Context Protocol.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely browse, search, inspect, and understand local project files through Model Context Protocol tools.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to retrieve repository context through stdio-based MCP tools, including ranked repo maps, context packs, and live symbol search.6 npmMIT