| Crates.io | miyabi-mcp-server |
| lib.rs | miyabi-mcp-server |
| version | 0.1.0 |
| created_at | 2025-11-22 09:30:54.114057+00 |
| updated_at | 2025-11-22 09:30:54.114057+00 |
| description | MCP (Model Context Protocol) Server for Miyabi Agent execution |
| homepage | |
| repository | https://github.com/ShunsukeHayashi/Miyabi |
| max_upload_size | |
| id | 1945107 |
| size | 376,388 |
Model Context Protocol (MCP) server for language-agnostic Miyabi Agent execution via JSON-RPC 2.0.
miyabi-mcp-server implements the Model Context Protocol (MCP) via JSON-RPC 2.0, enabling language-agnostic integration with Codex CLI, GitHub Copilot, and other MCP clients. It exposes Miyabi's autonomous agent execution, GitHub operations, and knowledge management capabilities through a standardized RPC interface.
Key Capabilities:
| Method | Description | Parameters |
|---|---|---|
agent.coordinator.execute |
Execute CoordinatorAgent (DAG planning) | { "issue_number": 270 } |
agent.codegen.execute |
Execute CodeGenAgent (code generation) | { "issue_number": 270 } |
agent.review.execute |
Execute ReviewAgent (code review) | { "issue_number": 270 } |
agent.deploy.execute |
Execute DeploymentAgent (CI/CD) | { "issue_number": 270 } |
agent.pr.execute |
Execute PRAgent (PR creation) | { "issue_number": 270 } |
agent.issue.execute |
Execute IssueAgent (label inference) | { "issue_number": 270 } |
| Method | Description | Parameters |
|---|---|---|
github.issue.get |
Fetch single issue by number | { "issue_number": 270 } |
github.issue.list |
List open issues with filters | { "state": "open", "labels": ["bug"] } |
github.pr.create |
Create pull request | { "title": "...", "body": "...", "head": "..." } |
| Method | Description | Parameters |
|---|---|---|
knowledge.search |
Vector similarity search | { "query": "async runtime", "limit": 10 } |
| Method | Description | Returns |
|---|---|---|
server.health |
Check server health | { "status": "healthy", "uptime_secs": 12345 } |
server.version |
Get server version | { "version": "0.1.0", "build": "..." } |
[dependencies]
miyabi-mcp-server = "0.1.0"
cargo install miyabi-mcp-server
# Default: stdio mode on stdin/stdout
miyabi-mcp-server
# With environment variables
export GITHUB_TOKEN=ghp_xxx
export DEVICE_IDENTIFIER=macbook-pro
miyabi-mcp-server
# HTTP mode on port 3030
miyabi-mcp-server --transport http --port 3030
# With custom config
miyabi-mcp-server \
--transport http \
--port 8080 \
--github-token ghp_xxx \
--repo-owner your-org \
--repo-name your-repo
import json
import subprocess
# Start MCP server as subprocess
server = subprocess.Popen(
["miyabi-mcp-server"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
text=True,
)
# Send JSON-RPC request
request = {
"jsonrpc": "2.0",
"id": 1,
"method": "agent.coordinator.execute",
"params": {
"issue_number": 270
}
}
server.stdin.write(json.dumps(request) + "\n")
server.stdin.flush()
# Read JSON-RPC response
response = json.loads(server.stdout.readline())
print(f"Result: {response['result']}")
# Output:
# Result: {
# "status": "success",
# "tasks_created": 5,
# "execution_time_ms": 1234,
# "agent_type": "coordinator"
# }
# Start HTTP server
miyabi-mcp-server --transport http --port 3030 &
# Execute Coordinator Agent
curl -X POST http://localhost:3030 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "agent.coordinator.execute",
"params": {
"issue_number": 270
}
}'
# Response:
# {
# "jsonrpc": "2.0",
# "id": 1,
# "result": {
# "status": "success",
# "tasks_created": 5,
# "execution_time_ms": 1234,
# "agent_type": "coordinator"
# }
# }
# Search knowledge base
curl -X POST http://localhost:3030 \
-H "Content-Type": application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "knowledge.search",
"params": {
"query": "tokio async runtime",
"limit": 5
}
}'
import { JsonRpcClient } from 'json-rpc-2.0';
import WebSocket from 'ws';
const client = new JsonRpcClient((request) => {
const ws = new WebSocket('ws://localhost:3030');
ws.send(JSON.stringify(request));
return new Promise((resolve) => {
ws.on('message', (data) => {
resolve(JSON.parse(data.toString()));
});
});
});
// Execute agent
const result = await client.request('agent.coordinator.execute', {
issue_number: 270,
});
console.log(`Tasks created: ${result.tasks_created}`);
console.log(`Execution time: ${result.execution_time_ms}ms`);
// Search knowledge
const knowledge = await client.request('knowledge.search', {
query: 'async runtime patterns',
limit: 10,
});
console.log(`Found ${knowledge.results.length} results`);
{
"jsonrpc": "2.0",
"id": 1,
"method": "agent.coordinator.execute",
"params": {
"issue_number": 270
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "success",
"tasks_created": 5,
"execution_time_ms": 1234,
"agent_type": "coordinator"
}
}
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params: issue_number must be positive"
}
}
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client โ (Codex CLI, Python, TypeScript, etc.)
โ (JSON-RPC 2.0) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ stdio/HTTP
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ miyabi-mcp-server โ
โ - RPC Handler โ
โ - LRU Cache โ
โ - Metrics Collector โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RpcContext โ
โ - Agent Execution โ
โ - GitHub Client โ
โ - Knowledge Search โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Miyabi Agents โ
โ - Coordinator โ
โ - CodeGen โ
โ - Review โ
โ - Deploy, PR, Issue โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Required
export GITHUB_TOKEN=ghp_xxx
# Optional
export DEVICE_IDENTIFIER=macbook-pro
export REPO_OWNER=your-org
export REPO_NAME=your-repo
export CACHE_SIZE=1000
export LOG_LEVEL=info
miyabi-mcp-server --help
Options:
-t, --transport <MODE> Transport mode: stdio | http [default: stdio]
-p, --port <PORT> HTTP port [default: 3030]
-g, --github-token <TOKEN> GitHub personal access token
-o, --repo-owner <OWNER> Repository owner
-r, --repo-name <NAME> Repository name
-c, --cache-size <SIZE> LRU cache size [default: 1000]
-v, --verbose Verbose logging
-h, --help Print help
curl -X POST http://localhost:3030 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "server.health"
}'
# Response:
# {
# "jsonrpc": "2.0",
# "id": 1,
# "result": {
# "status": "healthy",
# "uptime_secs": 12345,
# "total_requests": 1000,
# "cache_hit_rate": 0.75,
# "active_connections": 5
# }
# }
# Run all tests
cargo test --package miyabi-mcp-server
# Run integration tests
cargo test --package miyabi-mcp-server --test integration_test
# Test with real GitHub API (requires GITHUB_TOKEN)
GITHUB_TOKEN=ghp_xxx cargo test --package miyabi-mcp-server -- --ignored
miyabi-types, miyabi-core, miyabi-agents, miyabi-github, miyabi-worktree, miyabi-knowledgejsonrpc-core, jsonrpc-derive, jsonrpc-stdio-server, jsonrpc-http-servertokio, async-traitserde, serde_jsonlruanyhow, thiserror, chrono, tracingmiyabi-agents - Agent implementationsmiyabi-github - GitHub API clientmiyabi-knowledge - Knowledge management and vector searchmiyabi-worktree - Isolated execution environmentmiyabi-discord-mcp-server - Discord-specific MCP server# codex.yaml
mcp_servers:
- name: miyabi
command: miyabi-mcp-server
env:
GITHUB_TOKEN: ${GITHUB_TOKEN}
REPO_OWNER: your-org
REPO_NAME: your-repo
{
"github.copilot.mcp.servers": {
"miyabi": {
"command": "miyabi-mcp-server",
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Licensed under the MIT License. See LICENSE for details.
Part of the Miyabi Framework - Autonomous AI Development Platform