@towry/mcp
v0.4.2
Published
MCP server implementation
Maintainers
Readme
@towry/mcp
MCP (Model Context Protocol) server for fast semantic codebase search.
Installation
pnpm add @towry/mcp
# or
npm install @towry/mcpUsage
As a CLI
pnpm dlx @towry/mcpWith Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"towry-mcp": {
"command": "npx",
"args": ["@towry/mcp"]
}
}
}Available Tools
grep_fast
Fast semantic codebase search. It first narrows files by keywords and filePatterns, then runs sgrep on the filtered set.
Parameters:
cwd(string, required): Working directory to search inkeywords(string[], required): Specific grep patterns such as"login|signin"filePatterns(string[], required): Specific filename globs such as"*auth*"semanticQuery(string, required): Natural-language query for semantic search
Development
# Install dependencies
pnpm install
# Build
pnpm build
# Watch mode
pnpm dev
# Lint
pnpm lint
# Type check
pnpm typecheckDebugging with MCP Inspector
The MCP Inspector is a browser-based tool for testing and debugging MCP servers.
Quick Start
# Using the package script (recommended)
pnpm inspect
# Or manually
pnpm dlx @modelcontextprotocol/inspector node dist/index.js
# Debug in watch mode (rebuild first, then run inspector)
pnpm build && npx @modelcontextprotocol/inspector node dist/index.jsInspector Features
Once the inspector opens in your browser (default: http://localhost:6274):
- Tools Tab: List all available tools, view their schemas, and execute them with test parameters
- Resources Tab: Browse any resources exposed by the server
- Prompts Tab: Test prompt templates
- Notifications Pane: View real-time server notifications and logs
Development Workflow
# Terminal 1: Watch and rebuild on changes
pnpm dev
# Terminal 2: Run inspector (restart after rebuilds)
pnpm inspectCLI Mode
For quick testing without the browser UI:
pnpm dlx @modelcontextprotocol/inspector --cli node dist/index.jsDebugging Tips
- Check tool schemas: Use the Tools tab to verify parameter types and descriptions
- Test edge cases: Try empty inputs, invalid types, missing required fields
- Monitor errors: Watch the Notifications pane for server-side errors
- Verify search flow: Test
grep_fastwith a small repository and focused keywords first
License
MIT
