omnimcp
v1.1.1
Published
Universal Model Context Protocol Client - The complete toolkit for MCP
Maintainers
Readme
OmniMCP - Universal Model Context Protocol Client
The complete toolkit for building AI-powered applications with Model Context Protocol (MCP) support.
What is OmniMCP?
OmniMCP is a comprehensive SDK for integrating with MCP servers, enabling seamless communication between AI models and external tools. It provides both CLI and programmatic interfaces for maximum flexibility.
Quick Install
npm install omnimcpFeatures
- 🚀 Multiple Transport Types: stdio, SSE, and HTTP support
- 🤖 AI Integration: Built-in OpenAI and Anthropic support
- 🛠️ CLI & Web UI: Interactive tools for testing and debugging
- 🔄 Automatic Retries: Smart retry logic with exponential backoff
- 📝 TypeScript Support: Full type safety and IntelliSense
- 🎯 Error Handling: Comprehensive error messages with recovery hints
Quick Start
CLI Usage
# Start interactive web UI
npx omnimcp web
# Connect to a local MCP server
npx omnimcp connect --transport stdio --command "node server.js"
# List available tools
npx omnimcp tools listProgrammatic Usage
import { MCPClient } from '@omnimcp/client';
// Create a client
const client = new MCPClient('my-app', '1.0.0');
// Connect to an MCP server
await client.connect({
type: 'stdio',
options: {
command: 'node',
args: ['path/to/mcp-server.js']
}
});
// List available tools
const tools = await client.tools.list();
console.log('Available tools:', tools);
// Call a tool
const result = await client.tools.call({
name: 'get_weather',
arguments: { city: 'San Francisco' }
});AI Integration
import { MCPClientWithAI } from '@omnimcp/client/providers';
// Create AI-enabled client
const client = new MCPClientWithAI('my-app', '1.0.0', {
apiKey: process.env.OPENAI_API_KEY,
provider: 'openai'
});
await client.connect({
type: 'stdio',
options: { command: 'mcp-server' }
});
// Use AI to intelligently call tools
const response = await client.queryAI(
"What's the weather in Tokyo?",
{ model: 'gpt-4' }
);Package Structure
This package includes:
- @omnimcp/core - Core types and utilities
- @omnimcp/client - Node.js client library
- @omnimcp/cli - Command-line interface
- @omnimcp/web - Web UI for testing
Documentation
For detailed documentation, examples, and API reference, visit:
License
MIT © OmniMCP Team
