About Mokei
Mokei is a TypeScript toolkit for building MCP clients and servers, orchestrating multiple servers, and creating chat and agent sessions. It also includes monitoring and CLI tools.
Key features
- 01MCP client and server implementations
- 02Multi-server orchestration and namespacing
- 03Chat sessions and agent tool loops
- 04OpenAI, Anthropic, Ollama, and GGUF providers
- 05Live MCP traffic monitoring
- 06CLI for chat and server inspection
Use cases
- 01Build TypeScript MCP clients or servers
- 02Connect multiple MCP servers under one host
- 03Monitor MCP traffic and inspect servers
- 04Run interactive chats with tool execution
MCP support
Mokei implements both MCP clients and servers, supports multiple server connections through a host, and provides HTTP transports. Its monitoring and CLI can inspect or proxy MCP server traffic.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMokei
TypeScript toolkit for creating, interacting with, and monitoring clients and servers using the Model Context Protocol (MCP).
Features
- MCP Server & Client - Full protocol implementation
- Protocol Revisions - Serves and speaks both
2025-11-25and2026-07-28, selected per context or negotiated automatically - Multi-Context Host - Manage multiple MCP servers with tool namespacing
- Session Management - High-level chat abstraction with tool calling
- Agent Loop - Automatic tool execution with configurable approval
- Model Providers - OpenAI, Anthropic, Ollama, and local GGUF (llama.cpp) integration
- Monitoring - Real-time observation of MCP traffic
- CLI - Interactive chat and server inspection tools
Quick Start
pnpm add @mokei/session @mokei/session-node @mokei/openai-provider
import { NodeSession } from '@mokei/session-node'
import { OpenAIProvider } from '@mokei/openai-provider'
const session = new NodeSession({
providers: {
openai: OpenAIProvider.fromConfig({
apiKey: process.env.OPENAI_API_KEY
})
}
})
// Add an MCP server
await session.addContext({
key: 'myserver',
command: 'node',
args: ['my-mcp-server.js']
})
// Chat with tool access
const response = await session.chat({
provider: 'openai',
model: 'gpt-4',
messages: [{ source: 'client', role: 'user', text: 'Hello!' }]
})
Documentation
- Full Documentation - Complete guides and API reference
- Quick Start Guide - Get running in minutes
- docs/ - Local documentation
Packages
| Package | Description |
|---|---|
@mokei/context-server | MCP server implementation |
@mokei/context-client | MCP client implementation |
@mokei/host | Multi-context orchestrator |
@mokei/session | Portable chat and agent sessions |
@mokei/session-node | Node stdio session support |
@mokei/openai-provider | OpenAI integration |
@mokei/anthropic-provider | Anthropic Claude integration |
@mokei/ollama-provider | Ollama integration |
@mokei/llama-provider | Local GGUF inference via node-llama-cpp |
@mokei/http-client | MCP Streamable HTTP client transport |
@mokei/http-server | MCP Streamable HTTP server transport |
@mokei/flow-host | Mokei flow host: run decision flows in the background with approval, inbox and recovery |
@mokei/flow-host-node | Mokei Node flow host: durable storage and observability for decision flows |
@mokei/flow-client | Mokei flow client: portable flow control interface, types and errors for the flow daemon |
@mokei/host-desktop | Desktop dialogs, notifications and input inbox for Mokei hosts |
@mokei/decision-flow | Mokei decision flow node kind for flow graphs |
mokei | CLI tool |
CLI
mokei monitor # Start the monitor UI for MCP server traffic
mokei inspect # Inspect an MCP server (prints how it describes itself)
mokei chat -p openai # Interactive chat
mokei proxy <command> # Proxy an MCP server through the daemon
mokei daemon status # Manage the per-user daemon
mokei flows list # Inspect configured flows
mokei runs list # Inspect flow runs
mokei inbox list # Inspect pending inputs and approvals
Contributing
See AGENTS.md for development setup and code style guidelines.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.