Metadata-Version: 2.4
Name: simcipi
Version: 0.2.0
Summary: FastAPI + MCP integration framework
Author: Mohan
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.100.0
Requires-Dist: fastmcp==3.2.4
Requires-Dist: pydantic>=2.0.0
Requires-Dist: uvicorn>=0.20.0
Requires-Dist: openai
Requires-Dist: anthropic

simcpi

Build MCP-powered APIs with a single decorator.

simcpi combines FastAPI, MCP tools, LLM tool-calling, and an interactive playground into one framework.

Features
Single decorator → REST endpoint + MCP tool
Built-in Swagger docs
MCP streamable-http transport
Interactive MCP playground (/mcpark)
OpenAI and Anthropic support
Claude Desktop integration
In-process MCP client support
.mcpb export support
Installation
pip install simcpi
Quick Start
from simcpi import MCPApi
import uvicorn

app = MCPApi(
    title="Math API",
    provider="openai",
    api_key="your-api-key"
)

@app.create_tool_api("/add", method="POST")
def add(a: int, b: int) -> int:
    """
    Add two numbers together.
    Use this when the user asks for sums or totals.
    """
    return a + b


if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8000)

Run:

python app.py
Automatic Routes
Route	Purpose
/docs	Swagger UI
/mcpark	MCP playground
/mcp/mcp	MCP streamable-http endpoint
MCPark

MCPark is the built-in interface for testing MCP tools with LLMs.

Open:

http://localhost:8000/mcpark

Capabilities:

View registered tools
Run prompts against tools
Inspect tool calls and outputs
Switch between OpenAI and Anthropic
Configure custom base URLs and headers
Generate Claude Desktop config snippets
MCP Client
from simcpi import MCPApi
import asyncio

app = MCPApi(
    provider="openai",
    api_key="your-api-key"
)

@app.create_tool_api("/multiply")
def multiply(a: int, b: int) -> int:
    """Multiply two numbers."""
    return a * b


async def main():
    client = app.get_client()

    result = await client.run(
        "What is 12 times 9?"
    )

    print(result.answer)
    print(result.tools_called)

asyncio.run(main())
Claude Desktop Integration
app.connect_claude()

Restart Claude Desktop after running the command.

Export .mcpb
app.export_mcpb()

Generates a Claude Desktop installable bundle.

Custom LLM Endpoints
app = MCPApi(
    provider="openai",
    api_key="your-api-key",
    base_url="https://your-provider.com/v1"
)

Custom headers are also supported.

Supported Providers
OpenAI
Anthropic
Requirements
Python 3.10+
fastmcp==3.2.4
Why simcpi?

Traditional MCP setups often require:

separate MCP servers
separate API frameworks
manual tool registration
transport setup
additional orchestration code

simcpi unifies these into a single workflow.

Write a function once:

it becomes an API endpoint
it becomes an MCP tool
it becomes callable by LLMs
Example Tool
@app.create_tool_api("/weather")
def weather(city: str) -> str:
    """
    Get weather for a city.
    Use this when the user asks about weather conditions.
    """
    return f"Sunny in {city}"
Roadmap
Streaming responses
Additional MCP transports
OAuth support
Multi-agent orchestration
Tool analytics
Deployment helpers
License

License will be added in a future release.
