ctonneslan/mcpwire
The simplest way to connect to MCP servers. Two lines to connect, one line to call tools.
Platform-specific configuration:
{
"mcpServers": {
"mcpwire": {
"command": "npx",
"args": [
"-y",
"mcpwire"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
The simplest way to connect to MCP servers. Two lines to connect. One line to call tools.
import { connect } from "mcpwire";
const server = await connect("http://localhost:3000/mcp");
const result = await server.callTool("search", { query: "hello" });No transport configuration. No protocol negotiation. No boilerplate. Just connect and go.
The official MCP SDK is powerful but verbose. Connecting to a server takes 30+ lines of setup code. mcpx wraps it in a clean, ergonomic API so you can focus on building, not configuring.
| | mcpx | Official SDK | |---|------|-------------| | Lines to connect | 2 | 15-30+ | | Auto transport detection | Yes | Manual | | OpenAI/Anthropic tool format | Built-in | DIY | | Server discovery | Built-in | None | | Learning curve | 3 methods | 20+ classes |
npm install mcpwireimport { connect } from "mcpwire";
const server = await connect("http://localhost:3000/mcp");
// List tools
const tools = await server.tools();
console.log(tools);
// Call a tool
const result = await server.callTool("get_weather", { city: "NYC" });
console.log(result.content[0].text);
// Read a resource
const docs = await server.readResource("file:///README.md");
console.log(docs[0].text);
// Clean up
await server.close();import { connectStdio } from "mcpwire";
const server = await connectStdio("npx", [
"-y",
"@modelcontextprotocol/server-filesystem",
"/home/user/documents",
]);
const files = await server.resources();
console.log(files);import { connect } from "mcpwire";
import OpenAI from "openai";
const server = await connect("http://localhost:3000/mcp");
const openai = new OpenAI();
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "What's the weather in NYC?" }],
Loading reviews...