Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MCP crates #48

Merged
merged 2 commits into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
423 changes: 107 additions & 316 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -38,24 +38,16 @@ r2d2 = "0.8"
r2d2_sqlite = "0.22"
log = "0.4"
env_logger = "0.10"
# MCP Server dependencies
axum = { version = "0.6", optional = true }
tower = { version = "0.4", optional = true }
tower-http = { version = "0.4", features = ["cors", "trace"], optional = true }
async-trait = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
regex = "1.8"
chrono = { version = "0.4", features = ["serde"] }
thiserror = "1.0"
futures = "0.3"
pest = "2.7"
pest_derive = "2.7"
regex = "1.8"

[dev-dependencies]
criterion = "0.5"
tempfile = "3.8"

[features]
default = []
http = ["axum", "tower", "tower-http"]
53 changes: 1 addition & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -40,12 +40,6 @@ Named after the AI Ummon from Dan Simmons' Hyperion Cantos, this project provide
- Maps domain concepts to implementation details
- Creates a bridge between technical and business understanding

4. **AI Agent Integration with MCP**
- Provides Model Context Protocol (MCP) server for AI agent interaction
- Enables agents to explore code relationships and architecture
- Advanced visualization tools for navigating complex codebases
- Find relevant files for specific tasks or features

## Installation and Setup

```
@@ -92,29 +86,6 @@ ummon query "select functions where file_path like 'src/auth/%'" --no-llm

# Generate AI-assisted recommendations
ummon assist "implement a user registration function"

# Start an MCP server (Model Context Protocol) for AI agent interaction
ummon serve # MCP server uses stdin/stdout for communication
```

## MCP Server

Ummon includes a Model Context Protocol (MCP) server that allows AI agents to interact with codebase knowledge graphs. The server provides these capabilities:

### Available Tools:

- `search_code`: Search for code entities using a natural language query
- `get_entity`: Get detailed information about a specific entity
- `debug_graph`: Get information about the knowledge graph structure

### Example MCP Usage:

```bash
# Start MCP server with stdin/stdout transport (works with MCP Inspector)
ummon serve

# Connect to the server using MCP Inspector
npx @modelcontextprotocol/inspector ummon serve
```

## Configuration
@@ -132,7 +103,6 @@ Ummon is built with a modular architecture:
- Graph-based storage for entities and relationships
- LLM integration for semantic understanding
- Command-line interface for user interaction
- MCP server for AI agent integration

### Language Support

@@ -175,33 +145,12 @@ cargo test <test_name> # Run specific test
cargo fmt
```

### Testing the MCP Server

We provide multiple test clients for the MCP server:

```bash
# Using the full test client (spawns its own server)
node test/javascript/mcp_client.js

# Using the stdin client with an existing server
cargo run -- serve | node test/javascript/stdin_client.js
```

The test clients verify:
- Server initialization and capabilities detection
- Tool listing and execution
- Error handling with invalid methods and parameters
- Entity search and relationship exploration
- Resource management

### Test Resources

- `test/java/`: Java test files for parser testing
- `Test.java`: Simple Java class for basic parsing
- `ComplexExample.java`: Advanced Java features (generics, annotations, etc.)
- `test/javascript/`: JavaScript test clients
- `mcp_client.js`: Full-featured test client that spawns a server
- `stdin_client.js`: Simple client for piped testing
- `test/javascript/`: JavaScript test files for testing

## License

3 changes: 1 addition & 2 deletions docs/query_system.md
Original file line number Diff line number Diff line change
@@ -170,5 +170,4 @@ The query system consists of:
## Further Reading

For more information about Ummon, see:
- [README.md](../README.md) - Project overview
- [MCP Integration](mcp_integration.md) - For programmatic access
- [README.md](../README.md) - Project overview