docs.rs failed to build miyabi-mcp-server-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
miyabi-mcp-server
Model Context Protocol (MCP) server for language-agnostic Miyabi Agent execution via JSON-RPC 2.0.
๐ Overview
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:
- ๐ค Agent Execution: Coordinator, CodeGen, Review, Deploy, PR, Issue agents
- ๐ GitHub Integration: Issue fetching, listing, and PR creation
- ๐ง Knowledge Management: Vector-based knowledge search
- ๐ก Dual Transport: stdio (CLI) and HTTP (remote access)
- โก Performance: LRU caching and async execution
- ๐ Observability: Metrics, health checks, and detailed logging
๐ Features
Supported RPC Methods
Agent Execution
| 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 } |
GitHub Operations
| 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": "..." } |
Knowledge Management
| Method | Description | Parameters |
|---|---|---|
knowledge.search |
Vector similarity search | { "query": "async runtime", "limit": 10 } |
Health & Status
| Method | Description | Returns |
|---|---|---|
server.health |
Check server health | { "status": "healthy", "uptime_secs": 12345 } |
server.version |
Get server version | { "version": "0.1.0", "build": "..." } |
Transport Modes
- stdio (default): Standard input/output, ideal for CLI integration
- HTTP: HTTP server on configurable port (default: 3030), ideal for remote access
Performance Features
- LRU Caching: Reduce redundant agent executions
- Async Execution: Non-blocking agent execution with Tokio
- Connection Pooling: Reuse GitHub API connections
- Metrics Collection: Track execution time, cache hit rate, error rate
๐ฆ Installation
As a Library
[]
= "0.1.0"
As a Binary
๐ง Usage
Start Server (stdio mode)
# Default: stdio mode on stdin/stdout
# With environment variables
Start Server (HTTP mode)
# HTTP mode on port 3030
# With custom config
Client Example (Python)
# Start MCP server as subprocess
=
# Send JSON-RPC request
=
# Read JSON-RPC response
=
# Output:
# Result: {
# "status": "success",
# "tasks_created": 5,
# "execution_time_ms": 1234,
# "agent_type": "coordinator"
# }
Client Example (curl)
# Start HTTP server
&
# Execute Coordinator Agent
# Response:
# {
# "jsonrpc": "2.0",
# "id": 1,
# "result": {
# "status": "success",
# "tasks_created": 5,
# "execution_time_ms": 1234,
# "agent_type": "coordinator"
# }
# }
# Search knowledge base
Client Example (TypeScript)
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`);
๐ JSON-RPC Protocol
Request Format
Response Format (Success)
Response Format (Error)
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง Configuration
Environment Variables
# Required
# Optional
Command Line Arguments
|
๐ Metrics & Observability
Available Metrics
- Request Count: Total RPC requests received
- Success Rate: Percentage of successful requests
- Error Rate: Percentage of failed requests
- Cache Hit Rate: Percentage of cache hits
- Avg Response Time: Average execution time per method
- Agent Execution Count: Per-agent execution statistics
Health Check
# Response:
# {
# "jsonrpc": "2.0",
# "id": 1,
# "result": {
# "status": "healthy",
# "uptime_secs": 12345,
# "total_requests": 1000,
# "cache_hit_rate": 0.75,
# "active_connections": 5
# }
# }
๐งช Testing
# Run all tests
# Run integration tests
# Test with real GitHub API (requires GITHUB_TOKEN)
GITHUB_TOKEN=ghp_xxx
๐ Dependencies
- Core:
miyabi-types,miyabi-core,miyabi-agents,miyabi-github,miyabi-worktree,miyabi-knowledge - RPC:
jsonrpc-core,jsonrpc-derive,jsonrpc-stdio-server,jsonrpc-http-server - Runtime:
tokio,async-trait - Serialization:
serde,serde_json - Caching:
lru - Utilities:
anyhow,thiserror,chrono,tracing
๐ Related Crates
miyabi-agents- Agent implementationsmiyabi-github- GitHub API clientmiyabi-knowledge- Knowledge management and vector searchmiyabi-worktree- Isolated execution environmentmiyabi-discord-mcp-server- Discord-specific MCP server
๐ฏ Integration Examples
Codex CLI Integration
# 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 Integration
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
๐ License
Licensed under the MIT License. See LICENSE for details.
๐ Version History
- v0.1.0 (2025-10-25): Initial release
- JSON-RPC 2.0 server implementation
- stdio and HTTP transport support
- 6 agent execution methods
- GitHub operations (issue, PR)
- Knowledge search
- LRU caching and metrics
Part of the Miyabi Framework - Autonomous AI Development Platform