MCP Server
Learn how to deploy your own MCP server with Ink using a simple prompt.
Create an Ink account and connect MCP
Make sure you have an Ink account and have connected Ink MCP to your agent. There are two ways to connect:
- OAuth — authenticate through a browser flow, no keys to manage
- Token — create an API key at ml.ink/account/api-keys
See Quick Start for full setup instructions.
Verify the connection
Once the MCP server is connected, confirm your agent can reach it by asking it to check.
Do you have Ink MCP connected?
Build the MCP server
Ask your agent to build an MCP server. The agent will scaffold a TypeScript project using the @modelcontextprotocol/sdk package with tool handlers.
Build an MCP server in TypeScript that provides tools for querying a public weather API. Include tools for current weather and forecast.
Deploy with Ink
Tell your agent to deploy. Once live, you can add the deployed URL as an MCP server in Claude Code, Cursor, or any MCP-compatible client.
Deploy to Ink so I can use it from Claude Code
create_service(
"name": "weather-mcp",
"repo": "ink/weather-mcp",
"build_pack": "railpack",
"port": "3000"
)Connect your MCP client
Add the deployed URL as an MCP server in your client. Your MCP server is now accessible from any agent or IDE that supports the protocol.
Check logs and metrics (optional)
Ask your agent to pull build logs, runtime logs, or metrics for your deployed service.
Check metrics and logs
That's it — your MCP server is deployed and live. From here you can add a custom domain, set up environment variables, or explore more examples.