horizon-torn-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@horizon-torn-mcpshow my faction info"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
horizon-torn-mcp
TypeScript MCP server that exposes Torn API v2 operations as MCP tools.
@author: Galatar [4283617]
What This Server Does
Exposes Torn API v2 endpoints as MCP tools over stdio
Generates tool definitions from Torn's OpenAPI schema
Supports local development, local packaging, and npm publishing
Works with VS Code MCP using either workspace or global registration
Related MCP server: MCP Base Server
Prerequisites
Node.js 20+
npm
A Torn API key
Install From Source
Clone the repository.
Install dependencies:
npm installCreate a
.envfile from.env.exampleand set your Torn API key:
TORN_API_KEY=your_api_key_here
TORN_BASE_URL=https://api.torn.com/v2
TORN_OPENAPI_URL=https://www.torn.com/swagger/openapi.json
TORN_REQUEST_TIMEOUT_MS=30000Build
Build always regenerates the tool list before compiling.
npm run buildThis will:
Fetch the latest Torn OpenAPI schema
Regenerate
src/torn/tools/generated.tsCompile the server into
dist/
Run Locally
Run the compiled server over stdio:
npm run startFor development, run directly from TypeScript:
npm run devCreate A Publishable Package
Create a local npm package artifact:
npm run artifactThis produces a file like:
galatar-torn-mcp-<version>.tgzThe published package includes:
dist/README.mdLICENSE
Install From npm
If you publish this package, users can install it globally:
npm install -g @galatar/torn-mcpThe package exposes this executable:
horizon-torn-mcpRegister In VS Code MCP
VS Code can register MCP servers either per workspace or globally for all workspaces.
Option 1: Workspace Registration
Create .vscode/mcp.json in your project:
{
"servers": {
"horizon-torn-mcp": {
"type": "stdio",
"command": "node",
"args": ["dist/src/index.js"],
"cwd": "${workspaceFolder}",
"env": {
"TORN_API_KEY": "your_api_key_here"
}
}
}
}Use this when the server lives inside the current repository.
Option 2: Global Registration
Create this file in your VS Code user profile:
C:/Users/<your-user>/AppData/Roaming/Code/User/mcp.jsonUse an absolute cwd because ${workspaceFolder} is not available globally:
{
"servers": {
"horizon-torn-mcp": {
"type": "stdio",
"command": "node",
"args": ["dist/src/index.js"],
"cwd": "C:/path/to/horizon-torn-mcp",
"env": {
"TORN_API_KEY": "your_api_key_here"
}
}
}
}Option 3: Global Registration From npm Install
If the package is installed globally with npm, VS Code can call the published executable directly:
{
"servers": {
"horizon-torn-mcp": {
"type": "stdio",
"command": "horizon-torn-mcp",
"env": {
"TORN_API_KEY": "your_api_key_here"
}
}
}
}This is the cleanest setup for community users because they do not need to clone the repository.
Reload VS Code
After adding or changing an MCP definition, reload VS Code so it restarts the server and refreshes the tool list.
Use the Command Palette and run:
Developer: Reload WindowDevelopment Notes
Regenerate tools when the Torn OpenAPI schema changes:
npm run generateTool names follow the format
horizon_torn_<operationId>Required path and query parameters are enforced in tool input schemas
Authentication uses the header
Authorization: ApiKey <TORN_API_KEY>
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Promaxian/horizon-torn-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server