Self-hosted MCP
Search the web, fetch clean Markdown, map a site, or ask about String products from @usestring/mcp.
The hosted server is the recommended option
Most setups should use the remote (hosted) server — nothing to install, and always the current tool set. Run it yourself only when your client cannot reach a remote MCP server, or your environment requires a local process.
The self-hosted server is published on npm as @usestring/mcp. It runs
locally and talks to your MCP client over stdio. Web operations go to the String Web Access API with your API key;
product help reads String's public site pages at usestring.ai without sending the key there.
Self-hosting does not keep your network traffic local: calls reach either the Web Access API or String's public site over HTTPS. It also makes you responsible for upgrades, so a stale install quietly misses tools added since you last pulled.
Run it
The simplest way is npx, which requires no install:
STRING_AI_API_KEY=your-key npx @usestring/mcpOr install it globally and run the string-ai-mcp binary:
npm install -g @usestring/mcp
STRING_AI_API_KEY=your-key string-ai-mcpEnvironment
| Variable | Required | Description |
|---|---|---|
STRING_AI_API_KEY | Yes | Your String API key. |
Client configuration
Works with local MCP clients
Claude Desktop and Cursor can use the stdio setup below. Windsurf and VS Code work too.
- and more
Add the server to your MCP client's config. The same block works for Claude Desktop (claude_desktop_config.json),
Cursor, Windsurf, and VS Code:
{
"mcpServers": {
"string-ai": {
"command": "npx",
"args": ["-y", "@usestring/mcp"],
"env": {
"STRING_AI_API_KEY": "YOUR_API_KEY"
}
}
}
}Claude Desktop
Add the block to claude_desktop_config.json.
Cursor / Windsurf
VS Code
Add it to your user settings JSON, or a shared .vscode/mcp.json.
How it works
┌───────────────────┐ stdio (JSON-RPC) ┌──────────────────┐ HTTPS ┌─────────────────────────┐
│ VS Code / Cursor │ ◄──────────────────► │ @usestring/mcp │ ────────► │ Web Access API │
│ Windsurf / Claude │ │ (this server) │ └────► │ usestring.ai public docs │
└───────────────────┘ └──────────────────┘ └─────────────────────────┘- Your client spawns the server as a child process and talks to it over stdio.
- When the model needs the web, it calls
web_access_fetch,web_access_search, orweb_access_sitemap. Product questions callweb_access_product_help, which reads String's public site index. Optional failure reports throughweb_access_reportmust not delay useful recovery; send at most one per distinct failure per task. - Web operations are forwarded to the Web Access API using your
STRING_AI_API_KEY; product help reads current String-owned public pages without sending that key and returns its source links.
The self-hosted source includes the five tools above; the published package may lag these docs.
web_access_request, the remote server's
tool for POST, PUT and PATCH, is not included here, and this server's web_access_fetch still accepts a
method — it sends POST, PUT and PATCH directly while advertising a read-only hint, so prompt on it the way you
would on web_access_request.
Failure reports use the same API key for authentication but do not consume Web Access credits. The server redacts common credential forms before the diagnostic reaches support.
Test it
Use the MCP Inspector to try the tools interactively:
npx @modelcontextprotocol/inspector npx @usestring/mcpDon't want to run anything locally? Use the hosted server instead.