An open API service indexing awesome lists of open source software.

https://github.com/factspark23-hash/mcp-toolkit

๐Ÿ”ง Swiss Army Knife for MCP Servers โ€” Test, Debug, Scaffold & Discover Model Context Protocol servers
https://github.com/factspark23-hash/mcp-toolkit

ai claude cli developer-tools llm mcp model-context-protocol modelcontextprotocol testing typescript

Last synced: about 1 month ago
JSON representation

๐Ÿ”ง Swiss Army Knife for MCP Servers โ€” Test, Debug, Scaffold & Discover Model Context Protocol servers

Awesome Lists containing this project

README

          

# ๐Ÿ”ง MCP Toolkit

### The Swiss Army Knife for Model Context Protocol Servers

**Test ยท Inspect ยท Scaffold ยท Discover ยท Monitor**

[![npm version](https://img.shields.io/npm/v/factspark-mcp-toolkit?style=flat-square&color=blue)](https://www.npmjs.com/package/factspark-mcp-toolkit)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square)](https://nodejs.org)
[![GitHub stars](https://img.shields.io/github/stars/factspark23-hash/mcp-toolkit?style=flat-square)](https://github.com/factspark23-hash/mcp-toolkit/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/factspark23-hash/mcp-toolkit?style=flat-square)](https://github.com/factspark23-hash/mcp-toolkit/issues)

[Quick Start](#-quick-start) ยท [Commands](#-commands) ยท [Why MCP Toolkit?](#-why-mcp-toolkit) ยท [Contributing](#-contributing)

---

Building MCP servers? You know the pain:

- **No way to test** your server without writing a full client
- **No standard tool** to validate protocol compliance
- **Boilerplate hell** every time you start a new server
- **Finding servers** means digging through GitHub repos

**MCP Toolkit fixes all of that.** One CLI, five commands, zero friction.

## โšก Quick Start

```bash
# Install globally
npm install -g factspark-mcp-toolkit

# Test any MCP server
mcp-toolkit test npx @modelcontextprotocol/server-filesystem /tmp

# Interactive inspector
mcp-toolkit inspect npx @modelcontextprotocol/server-filesystem /tmp

# Scaffold a new server
mcp-toolkit scaffold my-server --language typescript

# Browse the registry
mcp-toolkit discover --category database

# Health check
mcp-toolkit health npx @modelcontextprotocol/server-memory
```

## ๐ŸŽฏ Commands

### `mcp-toolkit test` โ€” Validate Everything

Runs a full compliance check on any MCP server:

```bash
mcp-toolkit test ./my-server.js
mcp-toolkit test npx @modelcontextprotocol/server-github
mcp-toolkit test python server.py
mcp-toolkit test http://localhost:3000
```

**What it checks:**
- โœ… Server starts and completes handshake
- โœ… Protocol version compatibility
- โœ… All tools have valid schemas
- โœ… Tools respond to calls
- โœ… Resources are readable
- โœ… Prompts return messages
- โœ… Response time benchmarks

**Output:**
```
Test Results
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โœ“ connection
โœ“ server-info my-server v1.0.0
โœ“ capabilities tools=3 resources=1 prompts=2
โœ“ tool:greet Responded to empty call in 45ms
โœ“ tool:calculate Schema validates required params
โœ“ resource:info://app Readable โ€” 1 content block(s)
โœ“ prompt:summarize Returns 1 message(s)

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
7 passed
```

**JSON output for CI:**
```bash
mcp-toolkit test ./server.js --json | jq '.[] | select(.status == "fail")'
```

### `mcp-toolkit inspect` โ€” Interactive Debugger

Browse and call tools, read resources, test prompts โ€” all interactively:

```bash
mcp-toolkit inspect npx @modelcontextprotocol/server-filesystem /tmp
```

```
๐Ÿ” Interactive MCP Inspector

โœ“ Connected โ€” 5 tools, 1 resources, 0 prompts

? What do you want to do? (Use arrow keys)
๐Ÿ”ง Browse Tools (5)
๐Ÿ“ฆ Browse Resources (1)
๐Ÿ’ฌ Browse Prompts (0)
๐Ÿ“Š Server Info
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿš” Exit
```

### `mcp-toolkit scaffold` โ€” Zero to Server in Seconds

Generate production-ready MCP server projects:

```bash
# TypeScript minimal
mcp-toolkit scaffold my-server --language typescript --template minimal

# Python full (with prompts, tests, etc.)
mcp-toolkit scaffold my-server --language python --template full

# Skip npm install
mcp-toolkit scaffold my-server --no-install
```

**Templates:**

| Language | Template | What's Included |
|----------|----------|----------------|
| TypeScript | `minimal` | Server, tool, resource, README |
| TypeScript | `full` | + prompts, tests, eslint, vitest |
| Python | `minimal` | Server, tool, resource, README |
| Python | `full` | + prompts, tests, pytest |

### `mcp-toolkit discover` โ€” Server Registry

Find MCP servers from a curated, tested registry:

```bash
# Browse all
mcp-toolkit discover

# Search
mcp-toolkit discover --query filesystem

# Filter by category
mcp-toolkit discover --category database

# JSON output
mcp-toolkit discover --json
```

**Categories:** `filesystem` ยท `database` ยท `devtools` ยท `search` ยท `browser` ยท `api` ยท `ai` ยท `communication` ยท `web` ยท `reference`

### `mcp-toolkit health` โ€” Monitor Servers

```bash
# One-time check
mcp-toolkit health ./my-server.js

# Continuous monitoring
mcp-toolkit health ./my-server.js --watch --interval 10
```

```
โ”€โ”€ Health Report โ”€โ”€
Status: โ— HEALTHY
Latency: 142ms
Server: my-server v1.0.0
Tools: 3
Resources: 1
Prompts: 2
Checked: 2026-04-23T15:30:00.000Z
```

## ๐Ÿค” Why MCP Toolkit?

| Feature | MCP Toolkit | Manual Testing | Other Tools |
|---------|-------------|----------------|-------------|
| Protocol compliance testing | โœ… Built-in | โŒ Write your own | โŒ None |
| Interactive inspector | โœ… REPL UI | โŒ Console.log | โš ๏ธ Web only |
| Server scaffolding | โœ… 4 templates | โŒ Copy-paste | โš ๏ธ Limited |
| Server registry | โœ… Curated | โŒ Search GitHub | โš ๏ธ Lists only |
| Health monitoring | โœ… Watch mode | โŒ Manual | โŒ None |
| CI/CD ready | โœ… JSON output | โŒ No | โš ๏ธ Partial |

## ๐Ÿ”Œ Works With Everything

```bash
# Node.js servers
mcp-toolkit test ./dist/index.js

# Python servers
mcp-toolkit test python server.py

# npm packages
mcp-toolkit test npx @modelcontextprotocol/server-github

# Remote servers (SSE)
mcp-toolkit test http://localhost:3000

# Custom commands
mcp-toolkit test "docker run -i my-mcp-server"
```

## ๐Ÿ—๏ธ For CI/CD

Use `--json` flag for machine-readable output:

```bash
# In your CI pipeline
mcp-toolkit test ./server.js --json > test-results.json

# Fail build on any test failure
mcp-toolkit test ./server.js && echo "PASS" || echo "FAIL"
```

```yaml
# GitHub Actions example
- name: Test MCP Server
run: |
npm install -g factspark-mcp-toolkit
mcp-toolkit test ./dist/index.js
```

## ๐Ÿ“– Programmatic API

```typescript
import { connect, getServerInfo } from 'mcp-toolkit';

const conn = await connect('./my-server.js');
const info = await getServerInfo(conn.client);

console.log(`Tools: ${info.tools.length}`);
console.log(`Resources: ${info.resources.length}`);

// Call a tool
const result = await conn.client.callTool({
name: 'greet',
arguments: { name: 'World' },
});

await conn.close();
```

## ๐Ÿค Contributing

We love contributions! Here's how:

1. **Add a server to the registry** โ€” Edit `src/commands/discover.ts`
2. **Add a scaffold template** โ€” Edit `src/commands/scaffold.ts`
3. **Improve test coverage** โ€” Add tests in `tests/`
4. **Report bugs** โ€” [Open an issue](https://github.com/factspark23-hash/mcp-toolkit/issues)

```bash
# Development setup
git clone https://github.com/factspark23-hash/mcp-toolkit.git
cd mcp-toolkit
npm install
npm run dev
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## ๐Ÿ“‹ Roadmap

- [ ] Web UI for interactive inspection
- [ ] VS Code extension
- [ ] Server performance benchmarks
- [ ] Auto-generate client code from server
- [ ] Docker image for CI/CD
- [ ] More server templates (Rust, Go, Java)
- [ ] Server compatibility matrix

## โญ Star History

If MCP Toolkit helps you build better MCP servers, give it a star! โญ

## ๐Ÿ“„ License

MIT โ€” use it however you want.

---

**Built for the MCP ecosystem**

[Model Context Protocol](https://modelcontextprotocol.io) ยท [MCP Servers](https://github.com/modelcontextprotocol/servers) ยท [MCP Spec](https://spec.modelcontextprotocol.io)