Turn public methods into MCP tools.

Graftcode turns your existing code into an MCP server out of the box.
No wrappers, boilerplate, or custom server code.

YOUR_LOGIC.JS
class EnergyPriceCalc {
  getPrice() {
    return 100;
  }

  calculateBill(kwhUsed) {
    return kwhUsed * 100;
  }
}

[ GRAFTCODE GATEWAY ]

reading module...

CURSOR
tools.getPrice(): number → 100
CLAUDE
tools.getPrice(): number → 100

/WORKS WITH ANY MCP TOOL

Cursor
Claude
Windsurf
Roo Code
Continue
GitHub Copilot
Zed
Cursor
Claude
Windsurf
Roo Code
Continue
GitHub Copilot
Zed
Cursor
Claude
Windsurf
Roo Code
Continue
GitHub Copilot
Zed

/THE PROBLEM

Getting AI agents to call your code should not be this hard.

AI tools can call functions. The problem is everything around them - extra setup, extra layers, extra maintenance for code that already works.

>>> More setup than actual value

You spend time wiring infrastructure instead of shipping features.

>>> More layers to maintain

Schemas, tools, transports — all outside your real code.

>>> More ways things drift

Change a method? Update everything around it.

>>> More complexity for no reason

Your code already works. AI just can’t reach it.

>>> More setup than actual value

You spend time wiring infrastructure instead of shipping features.

>>> More layers to maintain

Schemas, tools, transports — all outside your real code.

>>> More ways things drift

Change a method? Update everything around it.

>>> More complexity for no reason

Your code already works. AI just can’t reach it.

/THE SOLUTION

Graftcode bridges that gap

Graftcode creates the MCP layer from your existing code, including callable tools agents can discover and invoke.

01 / WRITE

Your logic, zero annotations

Use the public methods you already have. No need to move code into a new framework or tool server.

cat your_logic.py
class EnergyPriceCalc:
    def get_price(self) -> int:
        return 100

    def calculate_bill(
        self, kwh_used: int
    ) -> int:
        return kwh_used * 100

02 / RUN

Host via Graftcode Gateway

Start the Gateway and point it to your project. It discovers your public methods and exposes them automatically.

class EnergyPriceCalculator {
  getPrice() {}
  calculateBill(kwhUsed) {}
}

03 / CONNECT

Use in any MCP client

Connect Claude, Cursor, ChatGPT, or another MCP-compatible client and let agents call your methods as tools.

{
  "mcpServers": {
    "my-service": {
      "url": "http://my-service:81/mcp"
    }
  }
}

/BEFORE & AFTER

Same result. A fraction of the code.

GraftCode turns existing public static methods into MCP tools, so teams do not hand-write MCP servers, tool definitions, schemas, or other code.

Without Graftcode

FOR_EACH_METHOD()
1

WRITE YOUR BUSINESS LOGIC

function calculateBill(kwhUsed) {
  return kwhUsed * getRate();
}
2

CREATE AN MCP SERVER

const server = new McpServer({
  name: 'energy-tools',
  version: '1.0.0',
});
3

HAND-WRITE TOOL DEFINITIONS_

server.tool('calculateBill', {
  description: 'Compute bill from kWh',
  inputSchema: {
    type: 'object',
    properties: { kwhUsed: { type: 'number' } },
  },
  handler: async ({ kwhUsed }) => ({
    content: [{ type: 'text', text: String(calculateBill(kwhUsed)) }],
  }),
});
4

DEFINE TRANSPORT AND START SERVER

const transport = new StreamableHTTPTransport({
  path: '/mcp',
});
await server.connect(transport);

With Graftcode

ONCE()
1

WRITE YOUR BUSINESS LOGIC

class EnergyPriceCalculator {
  calculateBill(kwhUsed) {
    return kwhUsed * this.getRate();
  }
}

No MCP setup beyond your code_

Run Graftcode Gateway — every public method becomes an MCP tool automatically.

  • No server code
  • No tool registration
  • No schemas
  • No maintenance

Add a method → it's instantly available.

Change a signature → types update automatically.

/WHAT YOU GET

Less setup. More building.

Graftcode handles the MCP layer, so your team can focus on the code agents should actually use.

No extra layer

No MCP server. No tool definitions. No schemas. Write your methods – Graftcode exposes them automatically.

Security built in

Access is enforced at the Gateway. Methods you don't expose don't exist as far as AI agents are concerned.

Works with your stack

Expose MCP tools from JavaScript, Python, .NET, and Java - without changing your service.

Methods become tools

Parameter names, types, and comments become tool definitions. No separate schemas. No duplication.

One source of truth

Same code for your app, your services, and AI. No parallel APIs or duplicated logic.

Maximum performance

MCP requests are translated into method calls handled by GraftCode Gateway, not custom HTTP handlers.

/FAQS

Before you ask

Less setup. More building.

No account. No credit card.Run your MCP endpoint and connect your AI tool in minutes!